mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #418] [MERGED] feat(cursor-review): don't count a round a push superseded toward max_rounds #419
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#419
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/418
Author: @mattmillerai
Created: 10/12/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-20267-rereview-every-push📝 Commits (2)
d1f4451feat(cursor-review): don't count a round a push superseded toward max_roundse27a13bfix(cursor-review): bound and harden the superseded-round excusal📊 Changes
5 files changed (+212 additions, -15 deletions)
View changed files
📝
.github/cursor-review/README.md(+1 -1)📝
.github/cursor-review/auto-approve.py(+90 -9)📝
.github/cursor-review/tests/test_auto_approve.py(+100 -0)📝
.github/workflows/cursor-review.yml(+9 -2)📝
docs/callers/cursor-review.md(+12 -3)📄 Description
Summary
A round that a newer push made moot no longer counts toward
max_rounds.auto-approve.py: the newsuperseded_by_push()check excludes a consolidated panel review fromround_reviews()when that round's own decision says the PR head moved. The round's commit is theheadin its body's round sentinel, not the review'scommit_id, which GitHub can move forward. "Own decision" means the first auto-approve review that:"Says the head moved" means its body has decide_gate's
the PR head moved while the review ranreason line.The
round-capjob, theroundoutput (next_round) and the #416 re-review checks (rounds_so_far) all go throughround_reviews, so all three use the new count.The cap stays bounded. At most one round is excused per reviewed commit, and at most
max_roundsin total, so a PR runs at most twice the cap's panels. decide_gate also no longer gives the head-moved reason for an unreadable (empty) live head; that case gets its ownthe PR head could not be readreason, and the SHA comparison is case-insensitive.These rounds still count:
APPROVER_TOKENidentity, which round-cap does not read. Counting it is the conservative side;The
roundoutput is computed before the round runs, so a round that is excused afterwards still reports N, and the next counted round reports N again. The docs now say this.Docs: the
max_roundsinput androundoutput descriptions,.github/cursor-review/README.md, anddocs/callers/cursor-review.md(input table, the round-cap section and the outputs table).Testing
python3 -m unittest discover -s .github/cursor-review/tests -p 'test_*.py': 1586 tests, OK. TheRoundCounterTestcases are built from the realrender_standing_body/render_body/render_round_sentinelwith CRLF-stored bodies. They cover:commit_id;max_roundsbounds;check_workflow_pins.py,check_agents_md.pyandcheck-org-repo-literals.shall pass.max_rounds/rounddescriptions in the workflow, the README and the setup guide.Residual
This PR delivers only item 3 of the ticket (superseded rounds stop counting), and only one of its two kinds of evidence. Still open:
Re-run after every head bump (item 1) is not done. #416's
auto-rereviewstill fires only when a push dismisses an approval. Its whole chain is built on that stalepasscard:mark_card_stalegates on a card approval, andcmd_auto_rereviewrequirescard.stale_head == headand reads its in-flight cutoff from the approval'ssubmitted_at. Extending it to a not-approved lane PR on everysynchronizeneeds three things:dismiss-stale-approval;Tests named by the ticket that are not written yet: a burst of pushes inside the cooldown starts one round on the last head (not-approved PR and dismissed approval), and a non-lane author's PR keeps label-only behaviour.
Cancelling the stale round on a push (item 2) is not done. Choose between reusing
run_without_label's supersede-on-push concurrency, scoped per PR to lane authors, and an explicit run cancel, then document the choice. Test still to write: a push while a round runs cancels it.Superseded-round evidence, second half. A round with no decision for its SHA, plus a newer head pushed before it finished, still counts. This is the cancelled-after-panel-posted case and a push during cursor-approve's axis phase. Two reasons it is not handled:
supersededoutcome is a card state, not a review this check can match on author.Cloud wiring is not done. It is a separate repo and lands only after this PR plus items 1 and 2 are pinned. Set the re-run input and
auto_rereview_delay_minutes: 10in the caller only after the bump: an undeclared input breaks every round. Per the ticket's burst analysis, also confirm the fleet push gate is live first.Unexercised artifacts: the cost scorecard PRD and the two linked review pages the ticket cites (not reachable from here). I did not re-measure the 19-of-80 head-moved figure against live PRs.
Provenance
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.