Repository navigation
feat(skills): publish changes through vetted-op-git instead of raw git recipes - #2228
Merged
Merged
Conversation
potiuk
enabled auto-merge (squash)
November 22, 2026 09:40
…t recipes The skills that go from a change to an open pull request now run the git steps as vetted-op-git operations (git-fetch, git-worktree-add, git-stage, git-commit, git-push-branch, git-pr-create), each still confirmed by the user, instead of handing out or running raw git push, git commit, git worktree add and gh pr create commands. The canonical sequence lives in one shared block, tools/dev/blocks/vetted-git-publish.md, rendered into a vetted-git-publish.md companion in each skill with that skill's --caller. It also carries the fallback: when no [git] values are configured for the project, the skill hands the user the commands as before; a draft pull request or a base other than pr_base keeps gh pr create --web. Rewritten: security-issue-fix, issue-fix-workflow, audit-finding-fix, setup-upstream-fix, setup-override-upstream, pr-management-shepherd, pr-management-code-review (FIXUP), release-audit-report, release-prepare, release-announce-draft, security-submit-to-oss-scan and committer-onboarding, plus the fix-workflow template, the PR and trailer conventions in AGENTS.md, and the docs that describe how the fix PR is opened. The vetted-ops README [callers] example gains the git-* grants for these callers. Generated-by: Claude Opus 5
… file Follow-up on the rebase over apache#2227, where the [git] values moved to each operator's ~/.config/apache-magpie/vetted-ops/operator-git.toml: - The shared vetted-git-publish block says where checkouts, worktree roots and the fork come from, quotes the new refusal ("no [git] values for <repository>") and names the table to add. - Magpie's own policy grants setup-upstream-fix and setup-override-upstream the git-* operations they now run from a session in the framework clone; without them both skills would always fall back to handing over commands here. No [git] table: those values are per maintainer. Generated-by: Claude Opus 5
potiuk
force-pushed
the
chore/skills-vetted-git-recipes
branch
from
November 22, 2026 10:02
fc4b253 to
8668408
Compare
3 tasks done
potiuk
added a commit
that referenced
this pull request
Nov 22, 2026
…e policy (#2231) #2230 and #2228 each added a "setup-upstream-fix" entry to [callers]. Git merged the two cleanly, but the key is declared twice, so the committed policy is no longer valid TOML and every vetted op in this repository fails on its config. Keep #2228's entry, drop #2230's. Add a test that loads the committed policy and checks every granted operation exists, so a merge like this fails CI. Setup config Step 3a.3 no longer lists missing shared-policy grants (a separate check covers it), and the setup skill's measured_tokens is refreshed. Generated-by: Claude Opus 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.
Summary
Follow-up to #2224, which added the
vetted-op-gitoperations but only updated the shared sandbox golden-rule block.The skills that publish a change still told the agent (or the user) to run raw
git push,git commit,git worktree addandgh pr create.This PR rewrites those publish paths to the vetted operations.
tools/dev/blocks/vetted-git-publish.md, rendered bycheck-shared-blocks.pyinto avetted-git-publish.mdcompanion per skill, with--callerset to the skill's own name.It maps each step to its operation (
git-fetch,git-worktree-add,git-worktree-sync,git-stage,git-commit,git-push-branch,git-pr-create,git-worktree-remove), says to run the pre-commit / pre-push checks in the sandbox first, and keeps every call user-confirmed.[git]values are configured for the project, the skill hands the user the commands as before. A refused caller names the missing grant; no skill borrows another's--caller. A draft PR or a base other thanpr_basekeepsgh pr create --web(git-pr-createopens ready PRs againstpr_baseonly).security-issue-fix,issue-fix-workflow,audit-finding-fix,setup-upstream-fix,setup-override-upstream,pr-management-shepherd,pr-management-code-review(FIXUP),release-audit-report,release-prepare(automated-signing draft PR),release-announce-draft(site PR, only when the site repo is the policy's upstream),security-submit-to-oss-scan(the<upstream>PR),committer-onboarding(CODEOWNERS / roster PRs).AGENTS.mdPR-opening and trailer bullets (thegit-commitmessage file carries the trailer, since the operation takes no--trailer), thefix-workflow.mdtemplate, and the docs that describe how the fix PR is opened.[callers]example gains thegit-*grants for these callers.Magpie's own policy grants
setup-upstream-fixandsetup-override-upstreamthegit-*operations; the[git]values stay per maintainer inoperator-git.toml.Deliberately left as commands the release manager or user runs: tag pushes in
release-rc-cut, the KEYS flow inrelease-keys-sync,security-issue-syncsite-records commits,setup-shared-config-sync(personal config repo), and pushes to a contributor's fork; none of these target the policy's upstream or fork.Type of change
Test plan
python3 tools/dev/check-shared-blocks.py --fix,tools/dev/skill-surface-hash.py --fix,skill-token-count --writeprek run --files <changed files>(all hooks pass, including the skill-and-tool validator and lychee)uv run pytestintools/vetted-opsandtools/dev🤖 Generated with Claude Code