Repository navigation
fix(ci): re-fire a readiness re-check hold once every check has completed - #37841
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: a CI-only fix for a pending status that never clears. The new retry fires only once every check is complete, the full rollup was read and the hold is Notes
[DESIGN-REVIEWED] 3cc2eea Description read[DESCRIPTION-READ] e98c3b538042091450b54f07e8dfde4d45951ae3f91ff9331d80bd05fe513588 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. It is a fix with a named defect (PR #21258 stuck for 16 days), it covers every writer of the hold from one place in the sweep, and the new branch runs only when no other evidence will ever arrive. What this change shipsInventory (4 items) — 4 justifiedIntent: let a
[FIRST-PRINCIPLES-REVIEWED] 3cc2eea Description read[DESCRIPTION-READ] 2daf12ec446bc762cbbedeec01846f53fee57c643d3609525b7d5a4af9689abd That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
I reviewed head 3cc2eea and walked the new sweep branch. It fires only on a re-check hold at least STALE_MINUTES old, with the full rollup read and no check-run still running. Every description pr-readiness.yml writes for a hold starts with the prefix the sweep matches, and the read-failure and withheld-verdict paths behave as before. The new tests and the existing sweep, debounce and scanner tests pass on this head. The core re-fire tests fail against main's sweep, and the running-check test fails when its guard is removed, so they do test the change. A recompute on a settled head writes its own verdict description, so the retry is bounded to once per STALE_MINUTES while a lane's run is still open, and I found nothing that blocks.
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Reviewed the full diff.
Sensitive change review (pr-readiness-sweep.yml, the sweep behind the one required status)
- What changed: one more re-fire case. A
PR Readinesspending whose description startsreadiness check(s) changed since evaluation;is re-fired once it isSTALE_MINUTESold, but only with zero check-runs running and a complete rollup read. - Before -> after: such a hold stayed pending until a push (#21258: 16 days) -> the sweep dispatches a recompute.
- Worst case if wrong: extra recompute dispatches, at most one per
STALE_MINUTESper PR while a hold persists. A recompute re-derives the verdict from live checks, so it cannot publish a green by itself. - Evidence checked: the quoted
caseprefix matches literally and fails closed on an empty description; the if/elif/else keeps the read-failure branch and thenot re-firingdefault exactly as before; a non-integer$runningmakes the test false and falls through. The new test pins the prefix against every hold site inpr-readiness.yml, plus the running, young, ordinary-pending and replaced cases. - No regression: every case that re-fired before still does; nothing is tightened.
- Undo: revert the squash commit.
PR Readiness green on this head.
Problem / Motivation
Goal: A
PR Readinessre-check hold no longer stayspendingforever once every check on the head has completed.PR Readinesswritesreadiness check(s) changed since evaluation; re-checking <lane>while a monitored lane runs, and relies on the self-heal sweep to re-fire it when that lane's completion shows up as check evidence. When the hold runs late (after the lane's check-runs finished, before its workflow run finished), every completion on the head predates the sweep's evidence floor. The sweep then logsnot re-firingon every tick. PR #21258 sat onre-checking Sensitive Change Reviewfor 16 days with every check complete.Why it matters
PR Readinessis the one required status. A frozen pending blocks a merge that is ready, and today only a push or a manualgh workflow run pr-readiness.ymlclears it.Not a goal
macOS Tests (on demand), the ~10-minute run time, rate-limit reserve deferrals). Measured and kept open in ci: PR Readiness stays pending on a re-check hold after every check completed #37840.What changed (motivation → approach → change)
[read-failed]stamp. A late hold has neither, so nothing re-fires it.STALE_MINUTESold, the rollup read was complete and no check-run on the head is still running, re-fire the recompute. The recompute replaces the hold's description, so it fires once; a recompute that writes a hold again is retried at most once perSTALE_MINUTES. A hold with a check-run still running stays on the evidence path.pr-readiness-sweep.ymladdsreadiness_is_recheck_hold(prefix match on the description, read only on the existing no-evidence branch) and the new re-fire reason.docs/ci/ci-and-reviews.mddescribes the rule.Backwards compatibility
Compatible: the sweep only gains one more re-fire case; every case that re-fired before still does.
Removes nothing: no key, path, status or check is removed or tightened.
Tests
test/test_pr_readiness_sweep_recheck_hold.pyruns the real sweep block against aghstub:STALE_MINUTESis not, and costs no status read;re-checkingdescription inpr-readiness.ymlstarts with the sweep's prefix.Proof: PROVEN test/test_pr_readiness_sweep_recheck_hold.py::test_a_hold_on_a_head_with_every_check_completed_is_refired, test/test_pr_readiness_sweep_recheck_hold.py::test_the_recompute_that_replaces_the_hold_ends_the_retry, test/test_pr_readiness_sweep_recheck_hold.py::test_every_hold_the_publisher_writes_carries_the_sweep_prefix (head 3cc2eea)
Determinism: 20/20 at
-n0, 10/10 at-n 4besidetest_pr_readiness_sweep.pyandtest_pr_readiness_sweep_debounce.py, and a shuffled order. All 120 sweep and scanner tests pass.Manual verification
On 2026-11-16 05:49 UTC the open heads in this state were re-dispatched with the documented command (no check skipped): PR #21258, PR #37806, PR #37298, PR #37789, PR #37616, PR #37787. Each got a real verdict within 30 s, which is what this sweep rule will now do on its own for the frozen case.
Related Issues
Part of #37840
Sibling sweep
Swept: git grep -n "re-checking" -- .github/workflows/pr-readiness.yml
Sibling: .github/workflows/pr-readiness.yml:812 -- not affected -- the hold step writes the prefix the sweep now matches
Sibling: .github/workflows/pr-readiness.yml:2384 -- not affected -- the publish re-check writes the same prefix, pinned by the new test
Pattern harvest
Not generalizable: the no-evidence pending classes are an explicit list in one sweep arm, and the new test pins every writer of this one.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)