Repository navigation
ci-flake: recalibrate backend unit shard budget to measured 900s - #23473
Git-on-my-level wants to merge 1 commit into
Conversation
Full-suite selections grew 1727 -> ~2270 files since the six-shard rebalance (#21259) sized ~288 files per shard under the 720s gate, so shards now carry ~378 and their walls drifted past the line on unrelated PRs: breaches 725/727/727/735/753s on 2026-10-24 (runs 40066874798 s1, 40061077340 s4, 40042164324 s4, 40065443584 s6, 40066103575 s6; near-misses 695/712/716s). No single file regressed — per-file session cost is unchanged and the drift tracks selection growth — so this is CI budget drift, not a product regression. Raise BACKEND_UNIT_STEP_BUDGET_SECONDS 720 -> 900, holding the 753s worst observed wall with 147s (19.5%) headroom, the same policy that set 720 over the then-worst 602s (220c64b). Green runs pay nothing: the gate only ends over-budget runs later. Raise the shard job ceiling 25m -> 30m so it still covers budget plus worst-plausible setup (72+90+570+900 = 1632s), preserving the invariant documented for the cancelled-shard flake of 2026-10-22.
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. |
There was a problem hiding this comment.
2 issues found across 4 files
Confidence score: 5/5
- In
.github/workflows/backend-unit-tests.yml, the shard header still says the regression gate is 720s, but the configured budget is 900s. Update the comment to 900s. - The apt step in
.github/workflows/backend-unit-tests.ymlhas a 420s timeout, so the 570s setup estimate does not match the configured cap. Recalculate it so the 30m headroom comment is accurate.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/workflows/backend-unit-tests.yml">
<violation number="1" location=".github/workflows/backend-unit-tests.yml:174">
P3: The shard header comment still calls the gate 'the unchanged 720s regression gate', but the budget is now 900s. Update that sentence to reference 900s so the comment matches the env value.</violation>
<violation number="2" location=".github/workflows/backend-unit-tests.yml:175">
P3: The apt step is capped at 7m (`timeout-minutes: 7`), so it cannot consume the stated 570s/10m. Recalculate this setup estimate using the configured 420s cap so the 30m headroom comment matches the workflow.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| # not the gate. | ||
| timeout-minutes: 25 | ||
| # 39741901310, 39739120103, 39676205452, 39668020536). 30m holds the | ||
| # 900s step budget (2026-10-24 recalibration, see the env comment) plus |
There was a problem hiding this comment.
P3: The shard header comment still calls the gate 'the unchanged 720s regression gate', but the budget is now 900s. Update that sentence to reference 900s so the comment matches the env value.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/backend-unit-tests.yml, line 174:
<comment>The shard header comment still calls the gate 'the unchanged 720s regression gate', but the budget is now 900s. Update that sentence to reference 900s so the comment matches the env value.</comment>
<file context>
@@ -163,20 +163,21 @@ jobs:
- # not the gate.
- timeout-minutes: 25
+ # 39741901310, 39739120103, 39676205452, 39668020536). 30m holds the
+ # 900s step budget (2026-10-24 recalibration, see the env comment) plus
+ # worst-plausible setup with the apt step capped at 10m (72s worst
+ # checkout + ~90s toolchain + ~570s apt cold allowance, 2026-10-23) and
</file context>
| # worst-plausible setup with the apt step capped at 10m (72s worst | ||
| # checkout + ~90s toolchain + ~570s apt cold allowance, 2026-10-23) and | ||
| # teardown — 72+90+570+900 = 1632s, leaving 168s inside the line; slow |
There was a problem hiding this comment.
P3: The apt step is capped at 7m (timeout-minutes: 7), so it cannot consume the stated 570s/10m. Recalculate this setup estimate using the configured 420s cap so the 30m headroom comment matches the workflow.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/backend-unit-tests.yml, line 175:
<comment>The apt step is capped at 7m (`timeout-minutes: 7`), so it cannot consume the stated 570s/10m. Recalculate this setup estimate using the configured 420s cap so the 30m headroom comment matches the workflow.</comment>
<file context>
@@ -163,20 +163,21 @@ jobs:
- timeout-minutes: 25
+ # 39741901310, 39739120103, 39676205452, 39668020536). 30m holds the
+ # 900s step budget (2026-10-24 recalibration, see the env comment) plus
+ # worst-plausible setup with the apt step capped at 10m (72s worst
+ # checkout + ~90s toolchain + ~570s apt cold allowance, 2026-10-23) and
+ # teardown — 72+90+570+900 = 1632s, leaving 168s inside the line; slow
</file context>
| # worst-plausible setup with the apt step capped at 10m (72s worst | |
| # checkout + ~90s toolchain + ~570s apt cold allowance, 2026-10-23) and | |
| # teardown — 72+90+570+900 = 1632s, leaving 168s inside the line; slow | |
| # worst-plausible setup with the apt step capped at 7m (72s worst | |
| # checkout + ~90s toolchain + 420s apt step, 2026-10-23) and teardown — | |
| # 72+90+420+900 = 1482s, leaving 318s inside the line; slow |
|
Closing as a duplicate of #23692 — the same recalibration of the same lines (shard step budget, shard job ceiling, contract pin, nightly ledger, #23692 extends this PR's measured distribution: this PR's table stops at the 2026-10-24 753s worst; #23692 adds the 2026-10-26 breaches (727/841/746/808s, worst 841s in run 40267543640) and the decisive same-code re-run pair (808s fail → 719s pass, run 40278890153). Same target values throughout: |
|
Hey @Git-on-my-level 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Flake
Backend unit shard N/6fails withFAIL: backend unit shard N took Xs, over its 720s regression budgeton PRs and main pushes whose changes are unrelated to the wall time. Dispatched example: run 40065443584 shard 6 (735s, PR #23437).Evidence it is a flake, not a real regression
Budget breaches on 2026-10-24 alone, all on full-suite selections (~2260–2277 files → ~377–380 files per shard):
Near-misses the same day: 716s (40066103575 s3), 712s (40065224420 s6), 695s (40065762218 s6), 689s. Five breaches across five runs on four different shards and unrelated code; the failing shard differs run to run and every test inside the steps passed. Small selections stay far under budget (82–236s), so only full-suite selections are exposed.
Root cause is suite growth, not a slower file: the selection grew from 1727 files when the six-shard rebalance (#21259, 2026-10-11) sized ~288 files per shard under the 720s gate to ~2270 today (+32%, ~378 per shard), and the slowest shard's wall drifted past the line almost linearly with it. The 720s value was set on 2026-10-03 (220c64b) as worst-observed-wall + 19.6% headroom over 602s; the same policy over today's 753s worst gives ~900s. The slowest single file (
tests/unit/test_runtime_image_contracts.py, ~187s session) is present in every run including green ones and is not new — no per-file regression to fix.Change
BACKEND_UNIT_STEP_BUDGET_SECONDS720 → 900 for the shard step, with the measured distribution recorded in the env comment. Green runs pay nothing: the gate only ends over-budget runs later.backend/tests/unit/test_workflow_contracts.pyand the budget mention inbackend/AGENTS.mdupdated to match.The
.github/workflows/backend-unit-tests.ymledit touches only this flake's own step and job ceiling; no new workflows, no skipped tests. Budget-raise-with-measured-evidence is the remedy David named for CI flake fixes (2026-10-22 standing ask); the alternative (widening the shard matrix) would trip the CI runner-minute budget ratchet (.github/ci-budget.yaml) and is better taken deliberately if the drift recurs — at the current growth rate (~13s/day on the max wall) this recalibration buys roughly a week and a half, and the env comment says so.Verification
backendvenv:pytest tests/unit/test_workflow_contracts.py— 94 passed.pytest tests/unit/test_backend_unit_ci_runner.py— 13 passed..github/scripts/check_ci_budget.py— passed (inventory unaffected: matrix, triggers, runner,if, and needs are unchanged).actionlinton the edited workflow — clean.scripts/pr-preflight --suggest— no product-invariant citations required; nofix:commit, no failure-class declaration required.