mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #342] [MERGED] fix(cursor-review): judge auto-approval staleness by the reviewed SHA #342
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#342
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/342
Author: @mattmillerai
Created: 10/6/2026
Status: ✅ Merged
Merged: 10/6/2026
Merged by: @mattmillerai
Base:
main← Head:matt/auto-approve-sha-marker📝 Commits (3)
143a136fix(cursor-review): judge auto-approval staleness by the reviewed SHA in the body08f5e01fix(cursor-review): warn when an approval is posted with no SHA markercaab420fix(cursor-review): dismiss-stale judges against the live head📊 Changes
2 files changed (+135 additions, -14 deletions)
View changed files
📝
.github/cursor-review/auto-approve.py(+53 -8)📝
.github/cursor-review/tests/test_auto_approve.py(+82 -6)📄 Description
ELI-5
When someone pushed new commits, the bot was supposed to take its approval back, but it didn't. GitHub quietly relabels an old approval as if it were for the new commit, so the bot thought its approval was still current. The bot now writes the commit it reviewed into the approval text and checks that instead.
What happened (live test on a cloud PR)
b01cf98.GET /pulls/N/reviewsreported that approval'scommit_idas the new head,edaf99f. GitHub does this whendismiss_stale_reviews_on_pushis off.stale_reviews_to_dismisscomparedcommit_idto the head, saw a match, and withdrew nothing. The Dismiss stale auto-approval job went green while the PR stayed APPROVED.Fix
render_bodyrecords<!-- cursor-review-auto-approve:sha=<reviewed sha> -->.stale_reviews_to_dismisscompares that recorded SHA with the live head and ignorescommit_id.Testing
test_moved_commit_id_does_not_hide_a_stale_approvalreproduces the live case.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.