Repository navigation
fix(pr-pipeline): let fix-ci take a job cancelled past its time limit - #10269
Conversation
…lled fix-ci-context fixes only failure, timed_out and startup_failure checks, so a head whose pr-require-checks run ended cancelled with none of those got up to three Skipped: not-applicable runs before the per-head cap stopped it (#9828's shape, cause "tested run completed/cancelled"). The dispatcher now skips such a head and logs the run and attempt; a cancelled run with a fixable check is still dispatched. The #9828 loop itself (47 runs on one head) predates #10046, which moved the per-head count from the newest-only GraphQL rollup to REST. Refs: #9828 Co-Authored-By: Claude Opus 5.5 <[email protected]>
GitHub ends a job that runs past its timeout-minutes with conclusion
cancelled, and only its check run's annotation ("The job has exceeded
the maximum execution time of 9m0s") says why. fix-ci-context counted
only failure, timed_out and startup_failure as failing, and the
reconciler re-runs a lost run at attempt 1 only, so #9828's head
c1184e0, whose test-bash (3) timed out on both attempts of run
40118648493, stayed red with no lane acting on it.
- infra-failure.mjs: timeLimitNoted reads GitHub's failure annotation,
anchored at the start of the message; reconcilerOwns makes fix-ci wait
for the reconciler's one re-run of a lost first attempt, as it does
for an infra-only failure.
- fix-ci-context.mjs: a cancelled check with that note counts as failing,
and the note reaches the model's context; other cancels stay out.
- fix-ci-dispatch.mjs: when the tested run ended cancelled and nothing
else is fixable, the dispatcher reads the cancelled checks' annotations
(rollup databaseId, dispatch.mjs listAnnotations) and dispatches a
time-limited head, logging the check; any other cancel keeps the skip.
- reconcile.mjs: a CI run lost again after its one re-run is named in the
summary with who takes it.
fix-ci's existing caps (per-head runs, loop.fix-ci-rounds, then
ci-fix-round-cap or report-escalation) end the retries. Based on
b6efed7 (fix/fix-ci-dispatch-cap), whose cancelled skip this narrows.
Refs: #9828
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ecks A cancelled tested run's failed job that a later contract-only run skipped shows only as SKIPPED in the rollup, so the cancelled-skip predicate held fix-ci off for good. The dispatcher now reads the head's check runs as fix-ci-context does and applies its exported failingChecks, so the two cannot disagree. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve onto the shared rule: the dispatcher judges a cancelled tested run by fix-ci-context's exported failingChecks over the head's REST check runs, and reads annotations by REST id only when every failing check is cancelled, so a time-limited cancel still dispatches and a skipped-over failure is no longer hidden. The rollup no longer queries databaseId. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d-heads # Conflicts: # .github/scripts/pr-unblock/fix-ci-context.mjs # .github/scripts/pr-unblock/fix-ci-dispatch.mjs # .github/scripts/pr-unblock/fix-ci-dispatch.test.mjs
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 No security issues found in this pull request. critical-findings: 0 I read the whole diff (11 files) and the PR context. The change lets fix-ci pick up a CI job that GitHub cancelled for passing its
Spend: a time-limited CI job can now trigger fix-ci model runs, which draw on prepaid credit or subscription usage and stay inside the existing per-head and round caps. That is not a hold and not a finding. |
|
claude-review reviewed No blocking or advisory findings. I read the whole diff and the PR context. I did not run the tests; the pass counts in the PR description are the author's claims and unverified. What I checked
Trusted paths: none of the changed files match a trusted-path glob. Closing issues: the PR says Observations (not counted as findings)
Spend: this change adds a few REST annotation reads per stranded head and may dispatch extra fix-ci runs, capped by the existing per-head and round limits. That draws on prepaid API credits only, so it is not a hold. |
Main's failingChecks now counts a cancelled check as failing (#10269); merged into gate-source.mjs it also reaches clear-escalations, where a cancelled lane keeps ci-status red once the label is off. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…fter-kill-switch reconcile.mjs takes both import sets: the PR's AGGREGATE_JOBS and FAILED for the switch kind, and main's LOST for #10269's lost-again summary. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Refs: #9828
Summary
A head whose CI job ran past its
timeout-minutesstayed red with no lane acting on it. GitHub ends such a jobcancelled. Only the job's check-run annotation says it hit the time limit. #9828's headc1184e03shows this: pr-require-checks run 40118648493 endedcancelledon both attempts, becausetest-bash (3)passed its 9-minute limit each time. The reconciler re-runs a lost run at attempt 1 only. fix-ci-context fixes onlyfailure,timed_outandstartup_failurechecks. So once attempt 2 ended, no lane would act on the head.A timeout that repeats usually means a test is slow or hangs, so a code fix is the right response, not another blind re-run. This PR hands such a head to fix-ci, and the model's context carries the time-limit note.
Fix
infra-failure.mjs:timeLimitNotedreads GitHub's failure annotation "The job has exceeded the maximum execution time of ..." and matches it only at the start of the message.reconcilerOwnsnow makes fix-ci wait for the reconciler's one re-run of a lost first attempt, as it already does for an infra-only failure.fix-ci-context.mjs: a cancelled check with that note counts as failing, and the note is passed into the context. A cancel without the note, such as a fail-fast matrix sibling, still has nothing to fix.fix-ci-dispatch.mjsanddispatch.mjs: when the tested run ended cancelled and nothing else is fixable, the dispatcher reads each cancelled lane check's annotations. It takes the check id from the rollup'sdatabaseIdand reads through the newlistAnnotations. A head with a time-limited check is dispatched, and the log names that check. Any other cancel keeps the existing skip.reconcile.mjs: each CI run that is lost again after its one re-run is named in the summary, along with who takes it.fix-ci's existing caps still end the retries: the per-head run cap,
loop.fix-ci-rounds, then aci-fix-round-caporci-fix-escalatedescalation, which adds the human-gated label and posts a comment (report-escalation.sh). That comment states the reason class, not the check name. The cause appears on the PR as the redtest-bash (3)check and its time-limit annotation.Not closed here: a run cancelled at attempt 2 or later with no time-limit note, such as a person's cancel, still produces no PR-visible signal. The only traces are the reconciler's summary line and the dispatcher's
skip fix-cilog line. A PR-visible signal for that case is an open design choice: a monitor detector, the reconciler failing its run on such a head, or accepting the pr-merge "held over 24h" signal.Verification
New tests use #9828's recorded fields: the run at attempt 2 ended
cancelled; check run 120950643531's two annotations are infixtures/annotations-120950643531.json;ci-statusfailed. Each new test failed before the change.infra-failure.test.mjs: 21 passreconcile.test.mjs: 76 passfix-ci-context.test.mjs: 29 passfix-ci-dispatch.test.mjs: 52 passmaintenance-reconcile-lost-runs/,pr-unblock/andactions/resolve-config/, plusrate-guard.test.mjs: 1630 pass, 0 failRelated
fix/fix-ci-dispatch-capbranch (b6efed7), whose cancelled-run skip this change narrows. Merge that branch first.🤖 Generated with Claude Code