mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #375] [MERGED] fix(cursor-approve): allow the checkout axes the shell they were meant to have #376
Labels
No labels
cursor-review-catalog-drift
groom
groom
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/github-workflows#376
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/github-workflows/pull/375
Author: @mattmillerai
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/8/2026
Merged by: @mattmillerai
Base:
main← Head:matt/axis-checkout-precomputed-diff📝 Commits (3)
9f977b7fix(cursor-approve): give checkout axes the git output instead of a shell they never had220a7abfix(cursor-approve): allow the checkout axes a shell instead of handing them a diffccf1100fix(cursor-approve): remove PR-authored .cursorignore files before an axis runs📊 Changes
3 files changed (+60 additions, -11 deletions)
View changed files
📝
.github/cursor-approve/tests/test_context_axes.py(+15 -0)📝
.github/workflows/cursor-axis-base.yml(+35 -7)📝
docs/callers/cursor-approve.md(+10 -4)📄 Description
ELI-5
The correctness, conformance and completeness reviewers are told to read the PR's diff with
git. Every shell command they try gets silently rejected, so they never see the diff and approve by guessing from files on disk. This PR gives them the shell they were always meant to have. The reviewer gets the merge-base range and decides how to review it. If the shell ever breaks again, the job now fails visibly instead of returning a blind verdict.What was wrong
cursor-axis-base.ymlwrites.cursor/cli.jsonwithallow: []. Unlessno_shellis set, it also writesdeny: [].cursor-agent --printhas no one to approve a command, so it rejects any shell call that no allow rule matches. On checkout axes, everygit diffandgit logcame back{"rejected": {..., "reason": ""}}. The agents fell back to Read and Grep and said so in their verdicts ("Shell/git was unavailable to me"). The caller docs promised the completeness axis "keeps a shell forgit", which was never true.Change
no_shellis false (the checkout axes), the config addsShell(*)toallow. Business and design are unchanged: they get no shell, the existing deny list, and the existing check that fails the job if a shell call appears anyway.no_shellaxes.rejected, which is exactly this bug..cursorignoreand.cursorindexingignoreare deleted alongside the PR's.cursor/config, so a PR cannot hide its own changes from the read and search tools of the reviewer judging it.Revised after review
The first version precomputed the diff into
.git/and pointed the agent at it. @huntcsg pointed out that a large diff can blow up the agent's context, and that with a shell the agent can choose its own approach:--statfirst, read only the relevant hunks, or script a check over a mechanical change. The prompt already names the range (git diff <merge_base>...<head>), so this version drops the precompute.Risk
This is the same unsandboxed shell over PR code that the cursor-review panel already accepts (see the
cursor-review.ymlheader). The axis job hascontents: read, a checkout withpersist-credentials: false, andCURSOR_API_KEYin the environment. For completeness, the existing note about the Linear proxy token on a passwordless-sudorunner still applies, and the docs keep it.Testing
python3 -m unittest discover -s .github/cursor-approve/tests -p 'test_*.py': OK. Two tests are new: the allow rule plus the all-rejected guard, and the every-axis tool-call guard.cursor-reviewandworkflow-pinssuites are OK.actionlint: nothing new. Its only warnings are the existingjob.workflow_shaones.cursor-agentlocally to confirm thatShell(*)turnsrejectedinto executed calls. The new guard turns the first real round into the test: either the transcript shows shell calls succeeding, or the axis job fails with "all N shell call(s) were rejected".Provenance
cursor-approveunittest suite: 164 tests OK at the current head, including the.cursorignoreremoval assertion.check_workflow_pins.py,check_agents_md.py --root .and the org-repo-literal lint pass.cursor-agentrun is still unverified (see Testing).Shell(*)allow rule after review..cursorignoreand.cursorindexingignorefiles. This was not in the original scope.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.