Repository navigation
ci-flake: raise backend-unit-shard ceiling so setup variance cannot cancel in-budget shards - #23270
Merged
Merged
Conversation
…not cancel in-budget shards The shard job timeout (15m) includes runner setup, but the 720s step budget deliberately excludes it — leaving only 180s for setup. Measured setup is 73-92s typical but 227s worst (run 39741901310 attempt 2: checkout 72s, apt-get 155s), so 227s + 720s = 947s crossed the 900s ceiling and GitHub cancelled the shard mid-run while its test step was still inside budget (687s elapsed, tests passing). The cancelled matrix aggregate then fails the gate with the opaque 'backend unit shards result was cancelled' signature. Four such 917-920s shard walls in the week to 2026-10-22: 39741901310, 39739120103, 39676205452, 39668020536; 39741901310 attempt 3 passed identical code, confirming a flake. 20m holds the 720s budget plus worst-plausible setup (apt is step-capped at 3m) and teardown. The step's own 720s budget check remains the regression gate and still fails loudly on slow test steps, so the job ceiling stays a hang bound, not the gate.
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. |
Git-on-my-level
deleted the
agent/m1-studio-zcode-glm-5-3/78570d52e7b5
branch
October 22, 2026 09:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backend unit suiteintermittently fails withbackend unit shards result was 'cancelled'(example: run 39741901310, PR #23263). Root cause: a solobackend-unit-shardjob crosses the job-leveltimeout-minutes: 15ceiling and GitHub cancels it, so the matrix aggregate iscancelledand the gate fails closed with no actionable message.The 15m job ceiling includes runner setup, while the 720s step regression budget deliberately excludes it ("Setup is outside this timer"), leaving only 180s of setup allowance. Measured setup across recent shard jobs: 73-92s typical, but 227s worst (run 39741901310 attempt 2: checkout 72s + apt-get 155s — the apt step is step-capped at 3m and completed within its cap). 227s + 720s = 947s > 900s, so the job was cancelled mid-run while the test step was still inside its budget (687s elapsed, tests actively passing when the runner was killed).
This raises the shard job ceiling to 20m, which holds the 720s step budget plus worst-plausible setup and teardown. The 720s step budget check is untouched and remains the regression gate — a slow test step still fails loudly with its slow-tail summary, so the job ceiling stays a hang bound, not the gate.
This is a CI flake fix under David's standing 10-22 ask (CI flake fixes fixed at the root; caching/budget changes with evidence approved). The
.githubedit touches only this flake's own step/job; no workflows are added.Flake evidence (same signature/mechanism, 4 occurrences in the week to 2026-10-22)
Every occurrence is a solo shard cancelled at a 917-920s wall (the 900s ceiling plus teardown):
backend unit shards result was 'cancelled'; attempt 3 re-ran identical code and shard 2/6 passed — flake, not regression.failurebecause another shard also had a real test failure in that attempt).Whole-run cancellations (all six shards cancelled together, PR supersede via
cancel-in-progress) are a separate, by-design path and unaffected by this change.Changes
.github/workflows/backend-unit-tests.yml:backend-unit-shardtimeout-minutes: 15→20, with the measured evidence recorded as a comment at the key. No trigger, matrix, runner, step, or budget-semantics changes; the 720s step budget and the fail-closed gate are untouched.scripts/ci/test_nightly_main_workflow.py: record the change inINTENTIONAL_BUDGET_CHANGES, the documented protocol for reviewed budget changes to nightly-reusable jobs (same pattern and failure class as theios-compile-check40→50 entry);budget_p50_minutes: 8in.github/ci-budget.yamlis unchanged since the p50 wall does not move.Verification
actionlint -shellcheck "" .github/workflows/backend-unit-tests.yml— clean.backend/tests/unit/test_workflow_contracts.py— 94 passed (includestest_backend_unit_suite_is_sharded_with_a_literal_gate_and_budget, which pins the shard/gate/budget contract; nothing pins the old ceiling).scripts/ci/test_nightly_main.py(15) andscripts/ci/test_nightly_main_report.py(10) — pass with the recordedINTENTIONAL_BUDGET_CHANGESentry.scripts/pr-preflight --pr-body-file— full check selection passes, includingci-budget,ci-budget-fixtures, andmain-push-ci-economy-contract;make preflightruns the same selection through the pre-push hook.