Repository navigation
perf(security-issue-import-from-pr): wording pass, with a vetted-ops PR read - #1457
Merged
Merged
Conversation
security-issue-import-from-pr needs the upstream PR's description to build the tracker body. The existing `pr-view` operation leaves `body` out, and adding it there would load every PR description into pr-management's sweeps. `pr-view-with-body` returns the same fields plus `body`. It reads only the policy-pinned upstream repository, and runs through `vetted-op-read`. The policy example grants it to security-issue-import-from-pr. Generated-by: Claude Code (Opus 5.5)
The optimize-skill rewrite pass, run paragraph by paragraph with the maintainer: one sentence per line, restated rationale cut, and pointers to the source (AGENTS.md, the security-issue-fix guardrails, scope-labels.md, the bot-credit policy) instead of copies of it. Headings, golden-rule headlines, code blocks, the generated review block and eval fixture strings are unchanged. SKILL.md goes from 840 to 679 lines. Fixes found along the way: - Step 1 fetched the PR with `gh pr view … > <scratch>/pr-<N>.json`. A redirected `gh` stays sandboxed under the secure setup and fails; the step now uses vetted-ops' `pr-view-with-body` read. - Step 3 checked the milestone with `gh api … | grep -F`, which is piped and fails the same way. It now lists the titles with one plain call and compares them. - 5c said labels are applied at creation, while 7a created the issue without them and 7b added hardcoded label literals in a second call. 7a now sets the configured labels at creation. - The rollup template linked to `.claude/skills/…` on the tracker, a path that does not exist there; it now links to the skill files in apache/magpie. - The mixed-scope guard now says that several sub-packages of one scope are not mixed. The step-2 multi-provider eval case, flaky before (2 of 4 runs), passes 4 of 4. Generated-by: Claude Code (Opus 5.5)
…ding pass The rewrite pass ends by writing down the rules the maintainer's edits implied, as bullets in the skill's learned-style region. These come from the security-issue-import-from-pr pass: point at the source instead of restating it, cut rationale a nearby section gives, leave short paragraphs alone, keep boundary-marking examples (an eval regressed without one), and fix sandbox-hostile `gh` calls met along the way. Generated-by: Claude Code (Opus 5.5)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First skill of the security-family wording pass (#1344): the optimize-skill rewrite pass, done paragraph by paragraph with the maintainer on
security-issue-import-from-pr.Summary
security-issue-fixguardrails,scope-labels.md, the bot-credit policy) instead of copies. Headings, golden-rule headlines, code blocks, the generated review block and eval fixture strings are unchanged.SKILL.md: 840 → 679 lines, 9,624 → 8,059 tokens (−16%).gh pr view. A redirectedghstays sandboxed under the secure setup and fails; the step now uses a new vetted-ops read,pr-view-with-body.gh api … | grep -F, which is piped and fails the same way. It now lists the titles with one plain call and compares them..claude/skills/…on the tracker, a path that does not exist there. It now links to the skill files inapache/magpie.pr-view-with-body(vetted-ops): the fields ofpr-viewplusbody. It reads only the policy-pinned upstream repository, throughvetted-op-read. Addingbodytopr-viewitself would load every PR description into pr-management's sweeps.Adopters: grant
pr-view-with-bodyto thesecurity-issue-import-from-prcaller in your vetted-ops policy file (.apache-magpie-overrides/tools/vetted-ops/config.toml).Test plan
prek runon the diff, after rebasing ontomain;skill-and-tool-validate;check-placeholderspr-view-with-body's command and checks it is a readmain) and after, outside the sandbox:case-5-multi-providerfailed once; it was already flaky onmain(2 of 4 runs). The mixed-scope clarification makes it pass 4 of 4.Part of #1344.
Generated-by: Claude Code (Opus 5.5)
🤖 Generated with Claude Code