Skip to content

perf(security): write rollups and body fields without loading them into context - #1451

Merged
potiuk merged 1 commit into
perf/security-preflight-skipsfrom
perf/security-rollup-rewire
Sep 28, 2026
Merged

potiuk merged 1 commit into
perf/security-preflight-skipsfrom
perf/security-rollup-rewire

Conversation

@potiuk

@potiuk potiuk commented Sep 28, 2026

Copy link
Copy Markdown
Member

Stacked on the P7 pre-filter PR; the last layer of the security family optimization (#1344). It is the optimize-skill out-of-context pass, built on the vetted-op-tracker procedures added two PRs below.

Summary

Skills used to read the whole rollup comment or issue body into context to append one entry or change one field, then wrote it back with a hand-rolled PATCH. They now call the vetted-ops tracker procedures, so neither the rollup nor the body enters context. The calls also work under the secure setup, where uv run … github-rollup could not reach gh.

operation replaces skills
rollup-append hand-built rollup posts and read / concatenate / PATCH upserts import, import-from-md, import-from-pr, invalidate, deduplicate, cve-allocate, issue-fix, sync
rollup-amend-latest invalidate 6f's re-PATCH to fill in the draft id invalidate
rollup-fold read / wrap / PATCH / DELETE fold-legacy sequences. The legacy comment is deleted only after the append succeeded. deduplicate, cve-allocate, issue-fix, sync
body-field-get / body-field-set whole-body fetches and rewrites that touched one field cve-allocate, issue-fix, sync
  • Entry templates keep their body text and drop the <details> envelope and marker line, which the tool writes.
  • Sync keeps a whole-body write only where it adds sections the body lacks.
  • rollup-append / rollup-amend-latest, and github-rollup append / amend-latest, now print the rollup comment's URL on stdout. Invalidate's permalink and import-from-pr's recap use it instead of a second lookup.
  • Each skill notes once how to run the same operations without the secure setup, through the github-rollup / github-body-field CLIs.
  • The vetted-ops policy example grants each security caller exactly the operations it uses.

Test plan

  • prek run --all-files, including lychee; skill-and-tool-validate; check-placeholders
  • vetted-ops and github-rollup test suites, including the new URL-output tests; ruff and mypy clean
  • Every eval whose extracted section changed, before (the base) and after, outside the sandbox:
    • cve-allocate step-4 / step-5, deduplicate step-4 / step-5, issue-fix step-2, import step-7, invalidate step-5e and sync step-2b pass fully on both sides.
    • cve-allocate/step-1/case-2 is flaky on both sides (1/3 before, 2/3 after). It fails whenever the model lists the cve allocated label as a second blocker.
  • Two output specs (invalidate step-5e, cve-allocate step-4) described the entry by its <details> line. They now describe it by the action label the tool writes into that line. Expected values are unchanged.

Part of #1344.

Generated-by: Claude Code (Opus 5.5)

🤖 Generated with Claude Code

@potiuk potiuk added family:security security-* skills family:tools tools/* labels Sep 28, 2026
@github-actions github-actions Bot added contract:tracker Tool capability: issue / board / label backend substrate:sandbox Tool substrate: agent isolation, egress control, settings audit labels Sep 28, 2026
@potiuk
potiuk added this pull request to stack #1445 September 28, 2026 09:44
…to context

The optimize-skill out-of-context pass. Skills read the whole rollup
comment or issue body into context to append one entry or change one
field, and wrote it back with a hand-rolled PATCH. They now call the
vetted-ops tracker procedures, so the rollup and the body never enter
context, and the calls work under the secure setup.

- rollup-append replaces the hand-built rollup posts and PATCH upserts
  in import, import-from-md, import-from-pr, invalidate, deduplicate,
  cve-allocate, issue-fix and sync. Entry templates keep their body text
  and drop the `<details>` envelope and marker line, which the tool
  writes.
- rollup-amend-latest fills invalidate's draft id into the entry it
  just wrote.
- rollup-fold replaces the read / wrap / PATCH / DELETE fold-legacy
  sequences (deduplicate, cve-allocate, issue-fix, sync). The legacy
  comment is deleted only after the append succeeded.
- body-field-get / body-field-set replace whole-body fetches and
  rewrites that touched a single field (cve-allocate, issue-fix, sync).
  Sync keeps a whole-body write only where it adds sections the body
  lacks.
- rollup-append and rollup-amend-latest (and github-rollup append /
  amend-latest) now print the rollup comment's URL, so invalidate's
  permalink and import-from-pr's recap do not need a second lookup.

Each skill notes once how to run the same operations without the
secure setup, through the github-rollup and github-body-field CLIs. The
vetted-ops policy example grants each security caller exactly the
operations it uses.

Generated-by: Claude Code (Opus 5.5)
@potiuk
potiuk force-pushed the perf/security-rollup-rewire branch from c64f0ad to ea4f3fa Compare September 28, 2026 09:49
@potiuk
potiuk merged commit da660f1 into main Sep 28, 2026
21 checks passed
@potiuk
potiuk deleted the perf/security-rollup-rewire branch September 28, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contract:tracker Tool capability: issue / board / label backend family:security security-* skills family:tools tools/* substrate:sandbox Tool substrate: agent isolation, egress control, settings audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant