Repository navigation
Read a Superseded Run's Failed Aggregator as Superseded in pr_review.py wait - #3256
Conversation
…py wait A closed and reopened pull request cancels its first workflow run, whose aggregator then fails over the cancelled jobs, while the reopen's run on the same head is still going and has not posted its own aggregator yet. `wait` read that failure as a verdict and exited 44. The rollup query now reads each suite's status and run id. A name only an older suite of a workflow carries is marked superseded while that workflow's newest suite has not completed, so it is not a stuck check, a held wait polls on it, and the digest names the newer run. Once the newer run completes, a name it never posted stands as the merge gate reads it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…guard The suite's status is a non-null field the query always selects, so the guard against it being absent protected only test fixtures. The fixture now carries a completed status by default. A held wait on a blocked merge is pinned to poll on a superseded gate until the newer run posts its own. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…back A check only reaches a workflow origin when its workflow run was read, and a read run always carries its id, so the fallback wording protected nothing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
A run waiting on its concurrency slot has a check suite and no check run, so the rollup alone missed it and a read in that gap still exited 44. The head commit's own suites now count toward each workflow's newest one. The exit-44 help sentence now says it is the newer run that has not finished. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
A queued replacement run may be missed, and the exit-44 help text remains ambiguous.
2 open issues
What changed in this PR
Updates pr_review.py wait to ignore failed checks from superseded workflow runs while newer runs remain active.
Changes:
- Tracks workflow suite status and run IDs.
- Suppresses superseded failures from exit 44.
- Adds regression coverage for superseded and completed runs.
| File | Summary |
|---|---|
tests/test_pr_review.py |
Adds tests for superseded workflow behavior. |
scripts/pr_review.py |
Implements superseded-run detection and reporting. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3256 +/- ##
==========================================
Coverage ? 65.56%
==========================================
Files ? 17
Lines ? 9946
Branches ? 0
==========================================
Hits ? 6521
Misses ? 3425
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
An older run still going behind a queued newer one keeps its own stuck reading, since the newer run cannot start until it finishes. The digest now says the newer run has not finished rather than that it is in progress, and the help sentence is split and rewrapped. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…odes The README's exit-44 and held-poll paragraphs now name a superseded check as the exception. The dead stale clause in the superseded test is gone, and the check_nodes docstring is rewrapped. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
CodeRabbit's pre-merge check "Docstring Coverage" read inconclusive at 75% across 4 touched functions. No change needed: the undocumented function is |
…and File-Naming Check to Main (#3266) ## Summary Promotes eight pull requests from develop. Three are `pr_review.py` reader fixes from this round, one answers this promotion's first review, and four are from other sessions. - #3261: each heading, thematic-break, and fence shape in `pr_review.py` has one primitive that every reader composes from. A no-break space after a heading's hashes no longer opens a heading, and a tab-spaced thematic break or setext underline closes its block. - #3262: when `wait` returns `50` at once on an uncounted-verdict head while a check has not concluded, it names a bounded `gh pr checks --watch` to watch the checks with. - #3264: `CODE_SPAN` reads code spans, raw inline HTML, and autolinks left to right, as GitHub binds them, so a backtick inside an earlier HTML comment, tag, or autolink opens no span. A line of only blockquote markers now ends a paragraph. - #3256: `pr_review.py wait` reads a superseded run's failed aggregator as superseded rather than as a verdict on the head. - #3258: a `driftNote` can exempt a tool-fixed script name from the file-naming check. - #3253: an audit check for file naming, including secret-file stem casing. - #3249: the Linux quick start names the no-sudo Debian case. - #3267: splits the over-long and two-instruction sentences that this promotion's first Copilot round found in #3249's paragraph. Closes #3241 Closes #3246 Closes #3235 Closes #3252 Closes #3254 Closes #3141 Closes #2551 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Summary
scripts/pr_review.py waitread a failed check from a superseded workflow run as a verdict on the head and exited44. The usual cause is a closed and reopened pull request. GitHub cancels the first run, whose aggregator then fails over the cancelled jobs, while the reopen's run on the same head is still going and has not yet posted its own aggregator.statusand its workflow run'sdatabaseId.check_nodesmarks a checksupersededwhen its name appears only in an older suite of a workflow whose newest suite has not completed. It records the newest run's id asnewer_run.check_shapereads a superseded check as not stuck. It no longer takes exit44, and a held wait still polls on it as settling.CHECK SUPERSEDEDfor a superseded check that did not pass, naming the newer run.Tests build the case from the issue: the first run's failed aggregator, plus a second run of the same workflow still in progress. Reverting the fix brings exit
44back and the wait test fails. A held-wait case and a case for a passed superseded check pin the other paths.Local review findings
The local pass's edit budget ran out on the first push. These two findings were listed then and are now fixed:
introduced, fixed in d1f3038: the newer run was found only through check runs it had already posted, so a read could still return44while the newer run waited on a concurrency slot. The head commit's owncheckSuitesnow count too.introduced, fixed in d1f3038, wording again in 5410b07: the exit-44 help sentence could be read as the older run being the one still running.Later passes also had the change supersede only a finished check, state the exception in
scripts/README.md, and drop a dead clause.Listed open after 255964b, when that push's edit budget was spent, and now fixed:
introduced, fixed in c96856a:test_a_superseded_check_that_passed_prints_no_superseded_linenever asserted that the green check was markedsuperseded. If the marking had stopped firing for that shape, the test would still have passed. The pass over c96856a found nothing.Closes on promotion: #3254
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
44is now limited to required checks that are stuck while merging is blocked.Documentation