mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #409] [MERGED] feat(cursor-review): auto-retry a round the panel broke, with an announced delay #410
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#410
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/409
Author: @mattmillerai
Created: 10/11/2026
Status: ✅ Merged
Merged: 10/11/2026
Merged by: @mattmillerai
Base:
main← Head:matt/cursor-review-auto-retry-errored-rounds📝 Commits (2)
fb6f081feat(cursor-review): auto-retry a round the panel broke, with an announced delayb9ade28fix(cursor-review): address panel findings on the errored-round auto-retry📊 Changes
8 files changed (+1077 additions, -47 deletions)
View changed files
📝
.github/cursor-approve/card.py(+33 -2)📝
.github/cursor-review/README.md(+2 -0)📝
.github/cursor-review/auto-approve.py(+123 -23)📝
.github/cursor-review/tests/test_auto_approve.py(+121 -5)➕
.github/cursor-review/tests/test_auto_retry_errored.py(+552 -0)📝
.github/workflows/cursor-review.yml(+152 -12)📝
docs/callers/cursor-approve.md(+12 -5)📝
docs/callers/cursor-review.md(+82 -0)📄 Description
Follow-up to #407. That PR made it possible to re-run a round on the same commit; this makes it automatic for the one cause that needs it most.
Why
A round can end with no decision for a reason that has nothing to do with the code — overwhelmingly reviewer cells erroring on provider capacity or a cell timeout. Re-running it is the entire fix, and until #407 there was no way to:
COMMENTED, which GitHub will not dismissSo a whole panel was spent and a human had to notice the card and relabel by hand.
What
Two new inputs, both off by default:
auto_retry_errored_roundsfalseauto_retry_delay_minutes0The card and the standing block name the wait before it starts (
in about 5 minutes). That is the point of the delay being visible: an author who reads "re-run automatically" and then sees nothing happen for five minutes re-runs it by hand, which is the work this removes.What bounds it
All pre-existing except the last:
decide's own marked block, shared with the moved-head cause rather than a second budgetmax_rounds— a round already at the cap is not retried into itGITHUB_TOKEN-applied label fires no run)blocking_without_trust). Mixed causes follow the strictest one.needs-human-reviewThe part worth reviewing closely
The gate now has two force signals and they are deliberately separate. The human one (
rereview_command) scans PR comments and authorizes by association. The retry posts no comment. Its signal is the marked blockdecidewrites, and the gate accepts it only when it:APPROVER_TOKENPAT, which theauto-retryjob relabels as)decide's own shape: the auto-approve marker first, and the retry marker on a line of its ownrereview_commandalone, so enabling auto-retry cannot widen who may force a round by commenting;test_the_retry_cannot_use_the_human_comment_pathpins that by reading the actual guard line.The gate hardcodes the marker literals because it runs before any asset is loaded. A test pins them equal to
auto_approve.AUTO_RETRY_MARKER/APPROVE_MARKER, and another pinscard.py's clamp equal to the workflow's.A real bug found while wiring this
The relabel job budgeted
timeout-minutes: 5. Any wait past that would have killed the round the card had already promised — the one failure mode where announcing a retry is worse than not retrying. Now 35 (5 + the 30 the delay clamps to), pinned by a test that fails if the budget drops below the cap. The job is also no longer namedRe-run the round (head moved), since it now serves two causes.Tests
New cases in
test_auto_retry_errored.py:Falsea retry cannot fixrender_standing_bodyoutput and against these payload shapes: older id, same-second block, other commit, PAT identity that relabelled, other human, dismissed, quoted marker, two marked, null body/id, empty listsleepstubbed:0 → none,5 → 300s,31/1000/23-digit →1800s,abc/-5/1.5→ nonepanel_gate, not a hand-written string, so producer and matcher cannot driftPlus behavioural cases in
AutoRetryTestthat drive the realcmd_decideand cover the card marker, already-blocking findings and threads, and the moved-head exemption. There are alsocmd_auto_retrycases for a PR that is closed, labelled for a human, or unreadable.Enabling it
Nothing changes for any existing caller — both inputs default off, and the zero-delay card sentence is byte-identical to today's. Turning it on for cloud is a separate PR there.
Provenance
Verified:
b9ade28)check_workflow_pins.py,check-org-repo-literals.shandcheck_agents_md.pypass;cursor-review.ymlparses as YAMLb9ade28was still pending at the time of this updateDeviations:
b9ade28. The gate identity check now accepts a Bot author or the label sender, instead of keying on the approver login, because the gate holds no token to resolve that login.APPROVER_TOKEN, a hand relabel on the same commit is still deduped. This is documented, andrereview_commandis the hand path.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.