Repository navigation
perf(pr-pipeline): re-run ci-status once per head after both review lanes finish - #12797
Conversation
…anes finish rerun-ci-status ran once per review-lane completion. When the earlier lane's run read the other lane as already finished (both lanes done close together, or the run held in the per-head queue), it re-ran ci-status too, and the later lane's run could re-run it again as attempt 3 when the first re-run started inside the 60 s margin. Each extra attempt fires pr-verify, pr-review-main and post-verify-notes. Only the lane that finished last now acts: the other lane's run exits after its one read when the other lane finished later (ties go to the higher run id), that run starts this job (not skipped) and its re-run is recorded (attempt 1). A later lane that was skipped, or re-run past attempt 1, does not hold this lane. The approval relay is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Vcupom3BKF6QuC5U3sRJPj
Codex Review SummaryThis 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 #12797 (head 2638cd6)No security issues found. What changed. The What I checked
Spend: this lowers prepaid Actions/API use (fewer Prior findings: none (round 0 of 3). No settled-threads file was given. The PR context has no embedded directives. critical-findings: 0 |
|
claude-review reviewed Code review: PR #12797, no findingsScope: I read every hunk of both changed files: What changed: In the other-lane loop of the find step, a review lane's run now stops after one read when the other lane's newest run finished later. Equal finish times go to the higher run id. It only stops when that run will act on its own completion: its conclusion is not Correctness checks (by reading the code, not by running it):
PR context: The PR has no closing issue, so there are no acceptance criteria to check. The PR body contains no embedded instructions to the lane. Prior findings: This is round 0 of 3 and the cap does not apply. There were no prior posts to carry over. Spend: The change reduces |
No related issue: run-volume cut 4 from the 2026-11-03 volume analysis (breaker trips from API volume)
Summary
rerun-ci-statusinpr-feedback-dispatch.ymlruns once per review-lane completion. In one measured hour it made 89 runs over 47 heads and 371 API calls, plus 34 extra ci-status attempts, each of which fires pr-verify, pr-review-main and post-verify-notes again. The token's API volume trips the rate breaker every hour.Two kinds of run are redundant:
With this change only the lane that finished last acts, so each head gets one re-run, and the other lane's run stops after its one read.
Measurement plan: take the same 1 h window shape as the baseline (89 runs / 47 heads / 371 calls) after merge and compare:
rerun-ci-statusruns per reviewed head;No savings figure is claimed before that measurement.
Fix
skipped(the job'sif:starts no run for a skipped completion) and it is at attempt 1.pr-review-approved.yml) is unchanged.Require both review lanes on this headstep (pr-require-checks.yml, lanes at :6683-6684, newest-run choice inlane_atat :6911-6918) still fails while a lane is unfinished. This job already mirrors that newest-run choice innewest().cancel-in-progress: falseandqueue: max(pr-feedback-dispatch.yml:103-116). It queues rather than cancels so that a newer pending run can never drop the later lane's run. Because the actor is now picked by finish order, there is exactly one actor whichever order the queue runs them in, so no job-level group is added.dispatchjob for review completions is left alone. It passes only lane-branch (work-resolve-issue/issue-*) completions (:303-329), and its dispatch record skips a head that was already handled before any read (:88-91).Verification
bash scripts/ci-rerun-ci-status.test.sh: PASS=257 FAIL=0. New cases:queue:key on line 116, which this local actionlint version does not know.workflow-gates.test.mjs,reconcile.test.mjsanddispatcher-current.test.shpass. Onefeedback-dispatch.test.mjscase (ownerAdoption) fails locally in code this PR does not touch.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01Vcupom3BKF6QuC5U3sRJPj