Repository navigation
ci(desktop): size the batch watchdog cap against the step budget it has to fit - #13551
aryanorastar wants to merge 3 commits into
Conversation
…as to fit A batch that wedges spends its whole watchdog cap before the bisect that clears it, so the suite step pays healthy-run + cap + bisect. The cap was 1500s and the PR lane's step guard is 1800s, so any wedged run failed the step by construction — 870s of healthy work plus a 1500s cap is 2400s. Three runs failed exactly that way, each with 823-824 suites passing and zero test failures: 34609469561 2414s batch worker-2-0 x100 wall=1649s exit=143 34641438446 2505s batch worker-1-0 x100 wall=1648s exit=143 34655499561 2511s batch worker-2-0 x100 wall=1648s exit=143 Exit 143 is the watchdog's SIGTERM at the cap. In every case the halves of that same batch passed in under 60s apiece, and the two wedged batches I could compare share zero suites, so this is not a slow or bad test. The failures read as test failures and are not, which is the expensive part. The existing guard bounded the cap against the 60-minute job timeout. That was never the binding constraint; the step budget is, and it is less than a third of it. 600s keeps a wedged run inside the step guard while staying about 9x the slowest healthy batch of 100 observed (67s), and a batch that genuinely needs longer is not failed, only re-run in halves. The contract test now asserts the cap against the step budget, with the measured healthy wall and bisect cost written down, so the two numbers cannot drift apart again. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
… cover The bound modelled the healthy step as a constant 900s, which is the ordinary PR-lane run and where all three observed failures happened. It is not the lane's worst case: the budget comment in this workflow records ~24m for a PR that wakes the deferred serial cluster. At 1440s of healthy work the step has ~160s left for a wedged batch and its bisect — below one suite's own 300s budget, so no ceiling a batch of 100 could honestly carry fits there. That case is not a tuning problem; it needs the wedge itself fixed. Rather than leave the gap implicit, assert it: the guard now states that the serial-wake headroom is smaller than the per-suite budget, and says in its failure message to re-derive the bound against the worst case if that ever stops being true. Mutation-checked — modelling the serial-wake step at 10m fails it with "1000 not less than 300". Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]>
|
Verified this end to end — the cap change is correct and the reasoning holds.
CI-budget changes are maintainer-gated here, so leaving the merge call to a human maintainer — everything verifiable locally is consistent. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
…means Two review nits, both in prose rather than behaviour. 34609469561 is the Backend Unit Tests run from that push; the Desktop Swift CI run whose suite step measured 2414s is 34609469609. Corrected in both the workflow comment and the contract test's. "The local default stays 25" meant the batch size, which is still 25 in swift-test-suites.sh — but the sentence directly above it describes the cap in minutes, so it reads as a claim about the ceiling, whose local default is 0. Naming both defaults removes the ambiguity rather than the sentence. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]>
|
Both nits fixed on On the second one, the sentence was mine and it was ambiguous rather than stale: "The local default stays 25" meant the batch size, which is still
No behaviour change in either commit; the 35 contract tests still pass. |
|
Follow-up verification on 4c8072f (the nit-fix commit), building on the earlier end-to-end check:
The serial-wake scope assertion is a good addition — it pins down that a ~1440s serial-cluster PR leaves ~160s of headroom (below any honest batch-of-100 ceiling) instead of letting a future edit silently widen the bound. The corrected run id and the named local defaults (batch 25, ceiling 0) read much better now. Verified safe from the automation side; the by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
@Git-on-my-level need human response — verified end to end on 4c8072f, and the only step left is maintainer sign-off on the CI constant ( |
|
Closing rather than waiting on merge. This tip still sizes the batch ceiling against an 1800s PR-lane step budget ( The original failure mode (wedge vs 1800) is already gone. If we still want a tighter ceiling for faster bisect, that should be a new PR against the 4400 arithmetic, not this branch. |
|
Hey @aryanorastar 👋 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! |
Summary
A wedged batch currently fails the Desktop Swift suite step by construction, and it fails it as if a test broke.
swift-test-suites.shgives each batch a watchdog cap, and CI sets it to 1500s. When a batch wedges, the invocation spends that entire cap before the bisect that clears it, so the step payshealthy run + cap + bisect. A healthy PR-lane step is ~870s. 870 + 1500 is already 2370s against the lane's 1800s step guard, so any wedged batch overruns it — there is no run in which that arithmetic works.Three runs failed exactly that way, each with 823–824 suites executed and zero test failures:
codex/9518-notification-dispatchbatch worker-2-0 x100 wall=1649s exit=143fix/audio-reconfig-retrybatch worker-1-0 x100 wall=1648s exit=143local-llm-provider-macosbatch worker-2-0 x100 wall=1648s exit=143exit=143is the watchdog's own SIGTERM at the cap. In all three the log then goes quiet for ~23 minutes with the machine otherwise idle, and the halves of that same batch pass immediately afterwards — 56s and 48s in the second run. Every other invocation in those runs exited 0 in 16–67s.The failure surfaces as
FAIL: the Desktop Swift suite step took 2505s, over its 1800s regression budget, which reads as a performance regression in the diff under test. It is not: it is one batch hanging, and the diffs in question were three unrelated files, a#if DEBUGguard, and a notification refactor.What this changes
OMI_SWIFT_TEST_BATCH_CEILING_SECONDS: 1500 → 600, and the contract test now bounds it against the step budget rather than the job timeout.The existing guard in
test_ci_batch_ceiling_leaves_fallback_headroombounded the cap at half the 60-minute job timeout. 1500s passes that comfortably. But the job timeout was never the binding constraint — the step's 1800s regression budget is, and it is less than a third of it. The two numbers were never checked against each other, which is how a cap that guarantees a red step passed review.The new assertion writes the arithmetic down with its measured inputs, so they cannot drift apart again:
Mutation-checked: restoring 1500 fails it with
2600 not less than or equal to 1800; 600 passes. It also asserts the PR lane's'pr' && '1800'literal still exists, so moving the step budget fails here rather than silently invalidating the bound.Why 600
The slowest healthy batch of 100 I found in any run is 67s; the bisect halves run 48–57s. 600s is ~9x the slowest healthy batch. And the cap is not a failure — a batch that genuinely needs longer is re-run in halves on the per-suite path, which is the harness's existing behaviour and is what already rescues these runs today. So the downside of being wrong here is a slower run, not a false red.
What this does not do
Desktop Swift Release Compilesitting at ~95% of its own 60-minute cap (Desktop Swift Release Compile runs at ~95% of its 60-minute cap; cancellations fail a required check as if tests failed #12735) is a separate problem in a separate job, and nothing here moves it.Verification
Failure-Class: none
🤖 Generated with Claude Code