Repository navigation
perf(ci): wait out a reset up to 12 minutes in rerun-ci-status - #17517
Conversation
Rerun CI Status shared one 600 s budget between its poll and its rate-limit waits, so a job held 9-25 minutes from the reset failed at once and left ci-status stale on that head. That happened 231 times in the 7 days to 2026-11-19. The rate waits now take RATE_WAIT_SECONDS (1800), apart from the poll. That outlasts the brake's longest hold (28 minutes). A wait sleeps and sends no calls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeBVgdbwavfuWZGmKnMhWX
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 #17517, changes since
|
|
claude-review reviewed Code review (incremental): PR #17517, perf(ci): wait out a reset up to 12 minutes in rerun-ci-statusNo blocking findings. This review covers what changed since The earlier finding is resolved. The earlier finding (the What this push does.
Tests.
Verification: I ran nothing; this lane has no shell. The test counts (310, 435) and the clean actionlint in the PR body come from the author and are unverified. Closing issue: the PR context has no closing-issue section ( Spend (not a hold): a rate-limited Rerun CI Status job can now sleep up to 12 minutes instead of 10, inside the same 15-minute timeout. That is slightly more runner time per such job. It adds no API calls. Trusted paths: Loosened-check verdict: fail (default: the prompt has no Verifier dropped 0 of 0 candidates. |
The reconciler's Pending kind must wait at least rerun-ci-status's timeout, so it does not race a late re-run. The timeout is now 45 minutes, so PENDING_BACKOFF_MINUTES rises from 20 to 45. The review-run fixture now derives its age from the backoff instead of a fixed time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeBVgdbwavfuWZGmKnMhWX
Replace the separate 1800 s rate wait with a hand-off. A rate limit whose reset is past rerun-ci-status's 600 s cap now ends the job with a notice, instead of failing. The reconciler's Pending kind already re-runs that ci-status: the same hand-off the job makes for a lanes App PR while the kill switch is on. The job's timeout and the reconciler's backoff stay at 15 and 20 minutes, so no merge waits longer, and the red job (231 in 7 days) goes away. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeBVgdbwavfuWZGmKnMhWX
Replace the hand-off with a longer wait. The reconciler's Pending kind takes only an attempt-1 ci-status red on a pending review, so it misses approval relays and a ci-status already at attempt 2, which the second review lane's re-run makes common. Those heads would have gone unrecovered with no flag (claude-review finding on #17517). Rate-limit waits now take RATE_WAIT_SECONDS (720), counted with the poll's waits, up from the poll's 600. That waits out resets up to 12 minutes away and re-runs ci-status itself. A longer reset still fails red and names the reset, as before. The 15-minute timeout and the reconciler's 20-minute backoff are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeBVgdbwavfuWZGmKnMhWX
Refs: #17460
Summary
When the repository token's hourly pool runs out, pr-dispatch-feedback's Rerun CI Status job fails red if the reset is past its 600 s cap: 231 times in the 7 days to 2026-11-19. Sampled resets were 9-25 min away, and the brake holds the pool a median 12 min. Most of those resets fit inside the job's existing 15-minute timeout.
Fix
RATE_WAIT_SECONDS: '720', counted with the poll's waits. They used to share the poll's 600 s. A reset up to 12 min away is now waited out, and the job re-runs ci-status itself.timeout-minutes(15),POLL_LIMIT_SECONDS(600), the reconciler'sPENDING_BACKOFF_MINUTES(20), and the brake, kill switch and floor. No merge or recovery waits longer than today.WAIT_BUDGET_SECONDS.rerunCiStatusRate(rate-guard.mjs) holds the value.rate-guard.test.mjspins the workflow's value and requires the timeout to cover it plus 2 min.Verification
Before (hub
lane_causes_daily.json, 7 days): 231 red jobs with "past this job's 600s cap".Expected after: about 60% fewer red jobs of this cause (3 of 5 sampled), each recovered right after the reset instead of by a person. Calls are unchanged. Measured from the same file 7 days after merge.
Local:
bash scripts/ci-rerun-ci-status.test.sh: 310 pass. New case: a reset 701 s away waits and re-runs. A reset past 720 s still fails and names the reset.node --testover rate-guard and reconcile: 435 pass.actionlint: clean.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01KeBVgdbwavfuWZGmKnMhWX