Repository navigation
fix(pr-pipeline): re-run floor-stopped ratings and stopped reviews - #17313
Conversation
…pped reviews on the first pass after the reset The lost-run reconciler never listed pr-rate-merge-risk runs, so a rating the GITHUB_TOKEN floor stopped stayed unrated. The rater's trigger check already takes the reconciler's record, so it joins RECORDED_LANES with its own judge and write steps (Rate the pull request, Write the rating). A floor-failed pr-require-checks run took one pass and the head's kill-switch-stopped reviews another, since the floored ci-status never got to name them; with one review lane per pass, ci-status could reach attempt 4, past RECONCILER_ATTEMPT_CAP. A floor or lanes-switch set now carries the head's stopped reviews, read from their own jobs, and both lanes go in one pass. Every floor kind now waits until a minute past the pool reset its refusals name (floorReset, a guessed time only when none is real), so its one re-run is not spent inside the floor; a waiting run keeps the pass from writing clean. The workflow file's copy of the Review paragraph, which said one lane per pass, is dropped: reconcile.mjs's header is the description. New rationale lives here rather than in new comments, under the comment lint. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A floor set carrying both stopped reviews holds three records. Placed after another PR's floor set, it found two uploads left and was deferred whole, so the 21:50 pass would have re-run less than it did before. When the whole set does not fit and the set without its reviews does, the floor re-run goes now and the reviews wait for the next pass; ci-status then reaches attempt 3 at most, inside RECONCILER_ATTEMPT_CAP. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review: PR #17313, lost-run reconciler re-runs floor-stopped ratings and stopped reviewsI found no security issues. I read all four changed files in full: the fixture, What I checked
Spend (not a finding): a lost attempt-1 rater run whose write never started is now re-run once, and each such re-run spends one more merge-risk rating from prepaid API credit or subscription usage. critical-findings: 0 |
|
claude-review reviewed Code review: PR #17313, lost-run reconciler re-runs floor-stopped ratings and stopped reviewsNo blocking or advisory findings. I read all four changed files in full in What I checked
Loosened checks. Some expected values in existing tests changed:
Each of these still asserts exact behaviour for a deliberate change of behaviour, and new tests cover the waiting-inside-the-floor case. None makes a check accept more than before, so none is a loosening. Closing issue. The PR says it closes none ("No related issue"), so there are no acceptance criteria to check. The PR context file contains no embedded instructions. Verification. The PR's own results (259 tests passing, mutants killed, Spend (not a hold). An attempt-1 rater run that was lost before its rating write started is now re-run once, which uses a second merge-risk rating from prepaid API credit or subscription usage. Verifier dropped 0 of 0 candidates. |
No related issue: two stalls the 2026-11-18 rate-limit floor exposed in the lost-run reconciler.
Summary
The lost-run reconciler now re-runs, on its first pass after the token pool resets:
pr-rate-merge-risk.yml) the GITHUB_TOKEN floor stopped, which it never listed before;pr-require-checksrun, instead of a pass later.Every floor kind now waits until a minute past the reset its refusals name, so its one re-run is not spent inside the floor.
Fix
Case 1, merge-risk runs 44402781806 (#17222) and 44402781658 (#17048): not covered. Rater runs are
workflow_runruns on main, so the per-head listing never sees them, and the lane listing walked onlyRECORDED_LANES(pr-verify, pr-review-main). The rater's trigger check already takes the reconciler's record (pr-rate-merge-risk.yml:209,620,reconciler-workflow:) and mints no broker token, which is the admission ruleRECORDED_LANESstates. It joins with its own judge and write steps (Rate the pull request,Write the rating);holdReasonnow reads each lane's write step.LANE_TRIGGERSgetssuccessonly, matching the rater's jobif.Case 2, #17282 review runs 44403904742 and 44403904926: sequencing. At the 21:50 pass (44405621288) the head's
pr-require-checksrun 44403903762 took the Floor kind (Mark Lanes refused at the floor). The Review kind is skipped once a set is non-empty, and it keys on ci-status's "a kill switch was on when it started" note, which attempt 1's floored ci-status never wrote. Attempt 2 wrote it at 21:53. The 22:12 pass (44409258703) found the PR already at a new head (pushed 22:08), so a push, not the reconciler, recovered this one. Without that push the reviews would have gone one lane per pass, taking ci-status to attempts 3 and 4; attempt 4 is pastRECONCILER_ATTEMPT_CAP(3), so pr-verify would refuse it.Now a Floor or Switch set also carries the head's stopped reviews, read from their own jobs (
reviewStopped,rateHeld), and both lanes go in one pass, so ci-status reaches attempt 3 at most. When the whole set does not fit the record uploads left, the floor re-run goes alone and the reviews wait a pass (a replay of the real 21:50 state is a test).Reset wait.
floorResetreads the latest reset the refusals name, counting the rate guard's guessed (fallback) times only when no refusal names a real one. The CI floor, the Verdict floor, and a lane run that ended within the last hour wait untilRATE_RESET_GRACE_MSpast it; a waiting run keeps the pass from writingclean.Behavior changes to note:
reconcile.mjs's header describes it.Not done: a rater run a kill switch stopped ends green with no rating (
pr-rate-merge-risk.yml:110-111) and is still not re-run. Detecting it needs a succeeded-run listing like the fault-held one (key leg:Check the kill switchsuccess,Resolve the pull requestskipped).Verification
node --test .github/scripts/maintenance-reconcile-lost-runs/*.test.mjs: 259 pass, 0 fail.fixtures/runs-floor-switch-2026-11-18.json: the rater run's jobs and annotations, test(source-control): give the capped-install case a 3s cap #17282's attempt-1 checks jobs with annotations, both review runs' jobs): the rater is re-run once at the 21:50 pass and not at 21:45 or at attempt 2 or after its write started; the floor plus both reviews go together at 21:50 and not inside the floor; reviews at attempt 2 are not re-run; the 21:50 replay;floorResetreal versus guessed; every workflow taking the reconciler record is a recorded lane or excluded with a reason; the rater still names its steps and takes the record.scripts/check-affected.sh: 13 passed, 6 skipped.Related
.github/actions/log-api-budget/rate-guard.mjs.scripts/lib/changelog-fragments.sh).🤖 Generated with Claude Code