Repository navigation
fix(ci): carry a fault-held run's hold so each pass stops re-reading it - #17023
Conversation
faultHeld read a held run's attempt-1 jobs and the held job's annotations on every reconcile pass, and a held run stays listed until its re-run takes one of the places, so a standing backlog was re-read pass after pass. A hold found on a whole listing whose every job's steps listed now goes into the carried job reads, marked held, and is read from the carry while the run shows the same head and updated_at, as holdReason already does for its attempt-1 reads. Verdicts, re-run choices and gates are unchanged: a carried run still counts against FAULT_HELD_READS, still moves heldSince and still waits on gateHold. Refs: #16642 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: no security issues found. I read both changed files in full: What I checked:
Spend: the change lowers GITHUB_TOKEN REST calls (no attempt-1 jobs or annotations read for a carried hold). There's no billing impact. critical-findings: 0 |
|
claude-review reviewed Code review: no findingsThis PR makes the lost-runs reconciler keep (carry) a fault-held run's hold from one pass to the next. It uses the same What I checked
Other checks
Loosened-check verdict: fail (default; the prompt gave no Verifier dropped 0 of 0 candidates. |
|
The pr-verify verifier failed head What it wrote (21 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
Refs: #16642
Summary
The lost-runs reconciler re-read every fault-held run's attempt-1 jobs and the held job's check-run annotations on every pass. A held run stays listed until its re-run takes one of the 3 re-run places, so a standing backlog of about 14 runs was read again pass after pass (2 calls each). Measured on the 11-17 brake hours: 13-16 annotation reads per pass, and 23-25 "deferred, all 3 re-run places taken" lines per pass. Expected saving: about 40-55 GITHUB_TOKEN REST calls per hour while a backlog stands.
Fix
faultHeldin.github/scripts/maintenance-reconcile-lost-runs/reconcile.mjsnow uses the carryholdReasonalready uses for its attempt-1 reads:keepJobs, key<run id>:1), with the slim jobs andheld: true.held: trueand the same head andupdated_atreturns the hold without any read. A changedupdated_atreads again.parseSettledaccepts the optionalheld: truefield.SETTLED_VERSIONis unchanged, since the rules that settle a run did not change and an old carry still parses.No behavior change: a carried run still counts against
FAULT_HELD_READS, still movesheldSince, still waits ongateHold, and still goes through the same re-run choice (places,MAX_IN_FLIGHT,RECONCILER_ATTEMPT_CAP, kill switches). Only a hold from a whole, step-complete listing is carried, so a cut listing that might later show a verdict write is read again as before.Verification
/actions/runs/301/attempts/1/jobsor/check-runs/7001/annotationsread, re-runs the same run with the same records, and carries the hold on. The first pass is asserted to make both reads.updated_atis read again (both calls) and still re-run.updated_atcomparison dropped), and passes with it in place.node --testover the folder's four test files: 241 pass, 0 fail.Remaining
What is still open on #16642 after this PR:
ci-lanesstatus write stays open.Related
🤖 Generated with Claude Code