Repository navigation
perf(pr-pipeline): run the lost-run reconciler hourly - #17533
Conversation
The reconciler spent about 200 GITHUB_TOKEN calls an hour (53 passes in 24 h at about 91 calls each) against a pool that runs out in busy hours. Its listings use a fixed 24-hour lookback (LOOKBACK_HOURS), so a pass costs the same at either cadence and an hourly schedule roughly halves its spend. - cron 4,34 -> 4; MIN_GAP_MINUTES 30 -> 60. - RERUN_DUE_MINUTES stays the reconciler's backoff plus two of its ticks, now 15 + 2 * 60: a scheduled run starts late and can defer a head at MAX_IN_FLIGHT, so fix-ci waits two ticks before it takes a head the reconciler would still re-run. - pr-unblock-dispatch keeps 9 and 39; its 9 tick still follows the reconciler's 4, and the cron test now checks that every reconciler tick is followed by a dispatcher tick. - Comments that stated the old cadence are deleted (comment lint); the workflow's opening summary restated the rules reconcile.mjs holds. Refs: #17460 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
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-review reviewed Code review (incremental, e833a99 → 746f9c8): perf(pr-pipeline): run the lost-run reconciler hourlyThis lane already reviewed an earlier head, so this pass reported blocking findings only. I read all 5 files in the incremental scope. I found nothing new to report. Both earlier findings are fixed:
Other "half-hourly" mentions. I searched the repository for the remaining ones. Each is about the dispatcher's own tick, which this PR keeps at Closing issues. The PR context has no closing-issue section; the PR body says Spend. This change lowers GITHUB_TOKEN calls and Actions minutes (one reconciler run an hour instead of two). There is no billing change, so there is no hold. Loosened-check verdict: fail (default). The wrapper wrote no Not run. This lane has no shell, so I ran nothing. The PR's test results are the author's claim and unverified. Verifier dropped 0 of 0 candidates. |
|
claude-security-review reviewed Security review: PR #17533, incremental (e833a99 → 746f9c8)No security issues found. This was an incremental review of the 5 files changed since What changed:
Controls checked: the trusted-trigger check, the lane token scope, the kill switch and the merge holds. No diff line touches any of them, so nothing is widened. After the kill switch is lifted, recovery still happens but can take up to an hour, which matches the head the lane already reviewed. Embedded text: none in the PR context. Spend: fewer reconciler runs mean fewer GITHUB_TOKEN calls and Actions minutes. Nothing new is billed. critical-findings: 0 |
…ourly reconciler notes Review of #17533: the cron test now pins pr-unblock-dispatch to 9 and 39 as well as checking a dispatcher tick follows each reconciler tick, so it is stricter than the exact-mirror check it replaced. Three statements of the reconciler's old 30-minute cadence (outage-posture audit, pipeline README, pr-require-checks' kill-switch comment) now say hourly. The dispatcher header paragraph said both its ticks follow a reconciler tick; it is deleted (comment lint). It also said: a tick runs the same listings as a push run and starts no fix-docs; heads the dispatch record holds are not read again; pr-unblock.yml's trigger gate and the broker accept a dispatcher run started by a push, a schedule or a listed human, and for pr-refine.yml a pull_request_target run (ADR 0090). The pipeline README (pr-unblock dispatch section) and request-lane-token's README keep those rules. Refs: #17460 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
Refs: #17460
Summary
The lost-run reconciler now runs hourly (minute 4) instead of at minutes 4 and 34. Over 24 h the :34 slot spent 1,496 GITHUB_TOKEN calls (~62/h) and the :04 slot 2,931 (the hub's job-calls log). In the 00-08Z hours that tripped the brake, pace.mjs had already cut each :34 tick to 1-2 calls, so most of the saving lands outside the trip hours.
Fix
4,34 * * * *->4 * * * *;MIN_GAP_MINUTES30 -> 60, so a dispatch inside an hour of a full pass skips.RERUN_DUE_MINUTESkeeps "backoff plus two reconciler ticks" (15 + 2 * 60 = 135): a scheduled run starts late and can defer a head at MAX_IN_FLIGHT, so fix-ci waits two ticks before taking a head the reconciler would still re-run.Verification
node --testover recent-pass, infra-failure, reconcile, jobs-batch, fix-ci-dispatch, workflow-gates: 413 pass.node --testover log-api-budget/pace, check-trusted-trigger, check-kill-switch: 568 pass.Remaining
if:(Done-when 2): not built; head SHA is already used where the semantics allow, the rest needs a gate change or is blocked by design. Per-workflow attribution of pr-merge's listings is in perf(pr-pipeline): keep the workflow file name in api-routes #17531.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd