Skip to content

fix(ci): re-run a CI Status whose read wait could not outlast the floor - #17033

Merged
kyle-sexton merged 1 commit into
mainfrom
fix/reconcile-ci-status-floor-note-mark-lanes
Nov 18, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
fix/reconcile-ci-status-floor-note-mark-lanes

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #16642

Summary

Of 74 brake-class CI Status stops at attempt 1 on 2026-11-17/18, the lost-run reconciler could re-run 23. This PR adds 11 runs (5.7 item-hours) to that count. Those runs failed only on ci-status's own floor message, "GitHub's core API rate limit blocks '' until , past the ... ci-status can wait to ...", which FLOOR_NOTE did not match.

The ledger's second proposed fix was to accept a run whose only other failed job is a floor-only Mark Lanes. It needed no code change. A replay of the recorded annotations shows the reconciler already does this:

  • The tested-run branch (reconcile.mjs floorFailed, called before the ci-status-only branch with onlyAggregateFailed) marks such a run floor whatever CI Status wrote.
  • 10 of the 16 Mark Lanes runs failed floor-only beside CI Status alone, and all 10 are floor items on current code.
  • The other 6 had a non-floor failure: a concurrency cancel, or a failure in another job such as Lint Repo or Test Bash. Those stay out by design.

Why those 10 were not re-run on the night is not established. Candidates are gate timing, or a reconcile kick sent only after a brake clears. This PR claims no gain for them.

Fix

  • FLOOR_NOTE gains GitHub's .+? rate limit blocks '.+?' until . That covers both of ci-status's read-wait refusals in pr-require-checks.yml: the "past the ... can wait to" one and the "made its 3 sends" one. The server-error siblings ("which holds 'gh api ...' until") still do not match.
  • fixtures/annotations-floor.json gains the recorded CI Status annotations of check run 134228143898 (run 44135395260, feat(formal-verification): prove the ci-lanes carry-forward promise #16886).

Verification

node --test over the folder's four test files: 242 pass, 0 fail. New tests:

  • The workflow's echo line, with its variables filled in, equals the recorded fixture line and matches FLOOR_NOTE. The "3 sends" sibling matches too. The server-error lines are present in the workflow and do not match.
  • A CI Status that failed alone with the recorded annotations is re-run once, with a record.
  • A floor-only Mark Lanes beside that CI Status is re-run as floor, ahead of lane runs. A Mark Lanes that failed for any other reason is not a floor item and waits behind the lane runs.
  • A server-error hold past ci-status's read wait is not re-run.

Before the pattern change, the two FLOOR_NOTE tests failed and the Mark Lanes test passed, which confirms the second fix was already in place. Replaying the ledger with the new pattern moves eligible CI-Status-alone stops from 23 to 34 (+11).

Remaining

Still open under #16642:

  • The hourly spend that fills the core pool.
  • Floor recovery for the issue lanes (work-resolve-issue and the other lanes outside the reconciler's scope).
  • Draining the backlog after a brake, at 3 re-runs per pass.

Related

🤖 Generated with Claude Code

ci-status's read wait writes "GitHub's <pool> API rate limit blocks
'<call>' until <T>, past the ... ci-status can wait to ..." (and the
"3 sends" sibling) when the token is at its floor. FLOOR_NOTE did not
match that wording, so the lost-run reconciler left those runs red: 11
of 74 brake-class CI Status stops at attempt 1 on 2026-11-17/18.

Add the pattern, with a recorded CI Status fixture pinned to the
workflow's echo line, and pin that a Mark Lanes floor failure beside such
a CI Status is a floor re-run while any other Mark Lanes failure is not.

Refs: #16642

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 18, 2026 04:05
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T04:07:12.517820Z 8165cbd Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 8165cbd19587f9f716c52a1ccc7b243eb9153ea4: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #17033, no findings

This PR adds one more alternative to FLOOR_NOTE: GitHub's .+? rate limit blocks '.+?' until . With it, the lost-run reconciler sees ci-status's own refusals at the rate-limit floor and treats that CI Status run as a floor re-run. The PR also adds the recorded annotations from check run 134228143898 as a fixture, plus tests for them.

What I checked

  • Both refusals are covered. I read the two lines in pr-require-checks.yml that write this refusal: L5096 (the "made its 3 sends" case) and L5126 (the "past the deadline" case). The new alternative matches both.
  • Server errors stay out. The server-error lines next to them (L5094, L5124) say "which holds 'gh api …' until", not "rate limit blocks", so they still don't match. That keeps the rule that a server error's Retry-After hold is not the floor.
  • Similar wording elsewhere doesn't match. pr-dispatch-feedback.yml writes "the token's rate limit blocks reading", which lacks the GitHub's … ' shape the pattern needs.
  • The new fixture meets the floorNoted test. Every failure annotation in it is one of these: a FLOOR_NOTE refusal, a could not … line that goes with a refusal (FLOOR_COMPANION), or an exit note. "Could not read this attempt's jobs" is a warning, so floorNoted ignores it.
  • Only the reconciler uses the pattern. FLOOR_NOTE and floorNoted are used only inside reconcile.mjs, at the floor checks for the tested run and for CI Status alone. The wider match reaches no other caller.
  • The test logic holds. The echoed helper takes the workflow's echo "::error::…" >&9 line, fills in its variables, and compares the result to the recorded fixture line. That ties the reconciler's pattern to the text the workflow actually writes.

Verification. The PR's report (242 pass, 0 fail, and the replay going from 23 to 34) comes from the author. I could not check it, because this lane runs without a shell.

Closing issue. The PR only references #16642 and closes no issue, so there are no acceptance criteria to check.

Loosened check. The wrapper gave no loosened_check_verdict: or loosened_check_patterns: line, so I used the default fail with no consumer entries. The diff does not loosen any check: it changes a pattern and adds tests and a fixture. Loosened-check verdict: fail (default, no loosening found).

Spend. No change to cost. More floor re-runs of CI Status will use some more Actions minutes on existing runners.

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 8165cbd19587f9f716c52a1ccc7b243eb9153ea4: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

This was a full review, not a blocking-only one: the lane had reviewed no earlier head. I read every hunk of all 3 changed files. None of them falls under a trusted-path glob.

What changed

  • reconcile.mjs#L631-L632: FLOOR_NOTE now also matches ci-status's "GitHub's … rate limit blocks '…' until " refusal.
  • A recorded annotations fixture and some tests were added.

What I checked

  • Can a forged annotation trigger a re-run? floorNoted (L639-L642) needs at least one failure annotation to match FLOOR_NOTE. Every other failure annotation must be a floor note, a ^could not companion line, or the exit note.
    • The new alternative has no anchor, like the three alternatives already there. So a job running pull request code could already print text that matches. This change adds no new class of input.
    • The only effect is that the reconciler re-runs a run's failed jobs (or the whole run), once and with a record. A re-run executes the same code under the same trigger and token, so a real failure fails again. It passes no gate and approves or merges nothing.
    • So this path leads to no token leak, no compromise and no charge.
  • Trust controls: reconcile.mjs is not one of the merge-hold scripts and not a trust-control action. The trusted-trigger check, the token broker, the kill switch and the merge holds are all unchanged.
  • Server-error holds: the server-error Retry-After lines still do not match FLOOR_NOTE, and a new test (SERVER_HOLD_LINE) checks that. This keeps the existing boundary between a rate-limit floor and a server error.
  • Fixture: the new annotations contain request IDs, a commit SHA and run IDs. They contain no secrets or tokens.

Spend: passing CI Status runs may now get one automatic re-run each, using prepaid Actions/API capacity. This is not a billing change and not a hold.

The pull request text contains no embedded instructions to the lane.

critical-findings: 0

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 48f4459 Nov 18, 2026
76 of 90 checks passed
@kyle-sexton
kyle-sexton deleted the fix/reconcile-ci-status-floor-note-mark-lanes branch November 18, 2026 05:03
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant