mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #407] [MERGED] feat(cursor-review): let a maintainer ask for another round on the same commit #406
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#406
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/407
Author: @mattmillerai
Created: 10/10/2026
Status: ✅ Merged
Merged: 10/10/2026
Merged by: @mattmillerai
Base:
main← Head:matt/cursor-review-rereview-command📝 Commits (3)
08cea43feat(cursor-review): let a maintainer ask for another round on the same commit091a5fffix(cursor-review): rereview_command — open PRs only, retry the re-add, page every review, first line before trimb32e82dfix(cursor-review): rereview_command — no issues grant, prefilter comments, wait out the remove📊 Changes
6 files changed (+722 additions, -11 deletions)
View changed files
📝
.github/cursor-review/README.md(+8 -2)➕
.github/cursor-review/tests/test_rereview_command.py(+407 -0)📝
.github/workflows/cursor-review-auto-label.yml(+140 -0)📝
.github/workflows/cursor-review.yml(+80 -4)📝
docs/callers/cursor-review-auto-label.md(+1 -0)📝
docs/callers/cursor-review.md(+86 -5)📄 Description
The problem
A round can reach no decision for a reason that has nothing to do with the code — most often reviewer cells erroring, which
approve_max_failed_reviewerscounts. The answer is to run it again. There was no way to.The dedupe in
Check for prior review on this commitkeys on a non-dismissed Bot review carrying the consolidated marker at the current HEAD SHA:Both documented escape hatches fail for exactly the case that wants one:
COMMENTED, and GitHub dismisses onlyAPPROVEDandCHANGES_REQUESTEDreviewsAcross 30 recent consumer PRs the panel review is
COMMENTED8 times out of 8 and has never once beenDISMISSED— consistent with the dismissal simply not being available. This repo nevertheless prescribed it in three places. The dedupe step's own comment already admitted the symptom: "it also made the documented remedy for a genuine error review (re-trigger on the same SHA) a silent no-op".What this adds
rereview_command— default'', so every existing caller is byte-identical. Set it to/reviewon both workflows and a maintainer comments/review:Two halves, because one cannot do it.
cursor-review.ymlis reachable only by a label: 49 of its expressions readgithub.event.pull_request, so a caller cannot invoke it from anissue_commentevent at all.cursor-review-auto-label.ymlalready exists to turn an event into that label with an App token, so the command becomes a new moment there — and it removes before re-adding, because adding a label that is already present raises no event, and after a round it always is. The gate half then declines to dedupe. Setting one half alone is a silent no-op, which both input descriptions say and a test pins.One request buys one round. The signal is a command comment newer than the review it overrides. The round it starts posts a newer review, so the next run dedupes again and a
/reviewfrom three rounds ago can never re-fire. No new label, no state to clean up.max_roundsis untouched.Safety
OWNER/MEMBER/COLLABORATOR), the bar/deriskapplies. The opted-in roster is deliberately not consulted — it governs who gets labelled automatically, not who may ask for a re-read.env:, never interpolated into arun:. A test asserts${{appears nowhere in that script, because${{ github.event.comment.body }}inside arun:is a shell-injection hole./review please look againcounts,/reviewerdoes not, and quoting someone else's/reviewfurther down a comment does nothing.skip-cursor-reviewstill wins, and so does a closed or merged PR: no label is touched unless the PR isOPEN.--paginate) before it picks the newest round. It takes the first line before trimming, so a body that opens with a blank line cannot move/reviewup from line two.Two bugs the tests caught before this shipped, both mine
["OWNER",…] | index(.author_association)— the pipe rebinds.to the literal array, so the association was read off that array, and every authorized comment errored rather than counting. The failure pattern gave it away: only cases that got past the firstselectfailed."" | split("\n")is[], so[0]wasnulland the nextsubdied on any empty, whitespace-only or missing comment body — i.e. on most real PRs.Neither was reachable by reading the filter; both fell out of running the real jq program against the payload shapes it will actually meet.
Tests
36 new, stdlib-only (no
yaml— CI installs no requirements). The jq program and the first-token pipeline are extracted from the workflows and executed, not copied, so the tests cannot drift from what ships: 23 payload shapes through the real filter, and theawktoken match run as the step runs it.All 10 mutations of the new guards are caught. One assertion initially passed for the wrong reason — it matched the words
issues: readinside the step's own explanatory comment, so deleting the actual permission still passed — and is now line-anchored.Suites: cursor-review 1452, cursor-approve 236, workflow-pins 551, pins lint and AGENTS.md integrity clean. The repo's own inputs-docs drift test required the new knob in the README table, which is how I learned I had missed it.
Docs
The three places prescribing the impossible dismissal are corrected rather than left to mislead, and both caller pages plus the README knob table document the input and the both-halves requirement.
Not in scope
No consumer caller is changed here — enabling this on a repo is a separate PR there, and needs
issue_commentadded to the auto-label caller's triggers.Provenance
Verified:
check_workflow_pins.py,check_agents_md.pyand the org-repo-literal lint passDeviations:
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.