Repository navigation
ci-flake: raise backend-unit-shard wall budget to 900s on measured variance evidence - #23347
Git-on-my-level wants to merge 1 commit into
Conversation
…riance evidence Seven all-green backend-unit shards tripped the 720s regression budget on 2026-10-22 (722-790s) while 48 same-day green shard walls ran 373-700s (median ~617s) on a selection that grew to ~2,206 files (367-368 per shard). The clearest variance proof: run 39844128555 shard 5 (PR BasedHardware#23289) took 732s on attempt 1 and 521s on attempt 2 of the same commit and selection. The gate now sits above that variance tail with 110s (13.9%) headroom over the worst observed legitimate wall and still inside the 20m job ceiling with worst measured setup (227s + 900s = 1127s). The .github edit touches only this flake's own step budget, per David's 2026-10-22 CI flake-fix mandate.
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d57231a80b
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # only with measured evidence; when suite growth erodes this | ||
| # again, rebalance the shard count with a ci-budget.yaml | ||
| # re-forecast the way #21237 did. | ||
| BACKEND_UNIT_STEP_BUDGET_SECONDS: "900" |
There was a problem hiding this comment.
Increase the job timeout alongside the step budget
When pre-test setup takes more than 300s—a reachable case in this job because checkout, Python/uv/Helm/dependency/cache setup all precede the test and the native-audio install alone has a 5-minute allowance—the unchanged 20-minute job timeout leaves less than this new 900s wall budget. GitHub will then cancel the shard before the post-run budget check at lines 304-308 can report its result, recreating the cancelled flake this change is meant to remove; raise the job ceiling too and update its pinned timeout contract.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
2 issues found across 3 files
Confidence score: 3/5
- In
.github/workflows/backend-unit-tests.yml, the 900-second test budget doesn’t account for native audio setup taking up to 5 minutes, so a slow setup can hit the 20-minute job timeout before the budget check. Align the timeout accounting with the setup cap. .github/ci-budget.yamlstill documents a 720-second gate, which makes budget audits and future re-forecasts inconsistent with the workflow. Update the shard rationale to 900 seconds.
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:176">
P2: The timeout accounting is incorrect: the native audio setup step is capped at 5 minutes, not 3. With a 900-second test budget, a slow setup can still hit the 20-minute job timeout before the budget check; align the setup cap and job-budget calculation so this gate cannot regress to `cancelled`.</violation>
<violation number="2" location=".github/workflows/backend-unit-tests.yml:292">
P3: The CI budget inventory still documents the old 720-second gate after this workflow raises it to 900 seconds. Update the shard rationale in `.github/ci-budget.yaml` so budget audits and future re-forecasts describe the current contract.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
| # teardown; slow TEST steps still fail loudly through the step's own | ||
| # 720s budget check, so this ceiling stays a hang bound, not the gate. | ||
| # 900s budget plus worst-plausible setup (227s + 900s = 1127s; apt is | ||
| # step-capped at 3m) and teardown; slow TEST steps still fail loudly |
There was a problem hiding this comment.
P2: The timeout accounting is incorrect: the native audio setup step is capped at 5 minutes, not 3. With a 900-second test budget, a slow setup can still hit the 20-minute job timeout before the budget check; align the setup cap and job-budget calculation so this gate cannot regress to cancelled.
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 176:
<comment>The timeout accounting is incorrect: the native audio setup step is capped at 5 minutes, not 3. With a 900-second test budget, a slow setup can still hit the 20-minute job timeout before the budget check; align the setup cap and job-budget calculation so this gate cannot regress to `cancelled`.</comment>
<file context>
@@ -159,21 +159,23 @@ jobs:
- # teardown; slow TEST steps still fail loudly through the step's own
- # 720s budget check, so this ceiling stays a hang bound, not the gate.
+ # 900s budget plus worst-plausible setup (227s + 900s = 1127s; apt is
+ # step-capped at 3m) and teardown; slow TEST steps still fail loudly
+ # through the step's own 900s budget check, so this ceiling stays a hang
+ # bound, not the gate.
</file context>
| # only with measured evidence; when suite growth erodes this | ||
| # again, rebalance the shard count with a ci-budget.yaml | ||
| # re-forecast the way #21237 did. | ||
| BACKEND_UNIT_STEP_BUDGET_SECONDS: "900" |
There was a problem hiding this comment.
P3: The CI budget inventory still documents the old 720-second gate after this workflow raises it to 900 seconds. Update the shard rationale in .github/ci-budget.yaml so budget audits and future re-forecasts describe the current contract.
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 292:
<comment>The CI budget inventory still documents the old 720-second gate after this workflow raises it to 900 seconds. Update the shard rationale in `.github/ci-budget.yaml` so budget audits and future re-forecasts describe the current contract.</comment>
<file context>
@@ -274,12 +276,20 @@ jobs:
+ # only with measured evidence; when suite growth erodes this
+ # again, rebalance the shard count with a ci-budget.yaml
+ # re-forecast the way #21237 did.
+ BACKEND_UNIT_STEP_BUDGET_SECONDS: "900"
run: |
step_started=$SECONDS
</file context>
|
Closing as a duplicate of #23692 — same change (shard step budget 720→900s in #23692 carries the latest measured distribution (through 2026-10-26, worst legitimate wall 841s in run 40267543640, plus the 808s→719s same-code re-run pair) and also updates the nightly |
|
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-wall-budget-over-720s— backend unit shard jobs failing their 720 s wall-budget regression gate while every test in the shard passes.Evidence it is a flake, not a regression
Seven all-green shards tripped the 720 s line on 2026-10-22 alone:
The decisive datum: run 39844128555 shard 5 took 732 s on attempt 1 and 521 s on attempt 2 of the same commit and the same 367-file selection — pure GitHub-hosted runner variance (CPU steal during per-file pytest process startup).
Across 48 green shard walls sampled from eight same-day runs, walls ran 373–700 s (median ~617 s); the selection has grown to ~2,206 files (367–368 per shard) versus the 1,727 the 720 s line was last balanced against (#21237), so the variance tail now crosses the gate.
Fix
Raise
BACKEND_UNIT_STEP_BUDGET_SECONDS720 → 900 s, the smallest durable change:.github/ci-budget.yaml: the Linux minutes/day cap (13,660) has ~23 min headroom against the current 13,637 forecast, and two extra shards × ~120 runs/day would add ~1,900 min/day. Rebalancing with a budget re-forecast remains the documented path if suite growth erodes 900 s, as Retrieve bounded Dream neighbourhoods with target and context roles #21237 did.backend/test.sh).Contract updates in the same commit: the workflow-contract pin in
backend/tests/unit/test_workflow_contracts.pyand the budget mention inbackend/AGENTS.md.The
.githubedit touches only this flake's own step budget, per the 2026-10-22 CI flake-fix mandate (David). No tests were skipped, xfailed, or deleted.Local verification (nice -n 19)
actionlint .github/workflows/backend-unit-tests.yml— cleanpytest backend/tests/unit/test_workflow_contracts.py backend/tests/unit/test_backend_typecheck_predicate.py backend/tests/unit/test_backend_unit_ci_runner.py— 109 passed.github/scripts/test_check_ci_budget.py— 12 tests OK