fix(test): give script-shelling measurement tests explicit 60s budgets (unblocks main) - #1321
Merged
Merged
Conversation
main is red: 'honours PHASE_ITERS as a comparison constant' timed out at vitest's 5000ms default on a loaded CI runner (5,690ms). This blocks green CI for every open PR. Same class as #1302 (send-integration afterAll): tests that shell out to real scripts do real work and need real budgets. Not a flake - a latent failure. On an UNLOADED machine these tests take 3.9-4.0s against the 5s default, i.e. ~80% of budget before any contention. The sibling 'emits byte-identical output twice' hit 4,576ms in the same CI run; it was next. Scope: 12 blocks in one file that invoke run() (11 tests + the beforeAll that populates the shared measurement output). Identified by parsing the file for blocks whose body calls run(), not by eyeballing. Non-shelling tests in the same file are pure fs reads and keep the default budget - a timeout on a test that cannot be slow is noise. 60_000 per the #1302 precedent. Nothing else in the diff. Follow-up, deliberately NOT in this hotfix: the underlying cost is that measure-prompt-surface.sh spawns python3 once per file for include expansion. Making that a single pass would cut seconds off every invocation. Worth doing; not worth coupling to an unblock-main commit.
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.
main is red — my test. Unblocks CI for every open PR, including #1320.
spec-1280-measurement-instrument.test.ts > honours PHASE_ITERS as a comparison constanttimed out at vitest's 5000ms default on a loaded CI runner (5,690ms). It passed on the
faster runner in #1319, which is why it landed.
Same class as #1302 (send-integration
afterAll): tests that shell out to real scripts doreal work and need real budgets.
This was a latent failure, not a flake
On an unloaded machine these tests take 3.9–4.0s against a 5s budget — ~80% consumed
before any contention. The sibling test
emits byte-identical output twice at the same commitrecorded 4,576ms in the same CI run; it was next in line regardless.
Scope
12 blocks in one file that invoke
run()— 11 tests plus thebeforeAllthat populates theshared measurement output. Identified by parsing the file for blocks whose body calls
run(), not by eyeballing, so nothing that shells out was missed.Non-shelling tests in the same file are pure
fsreads and keep the default budget: a timeouton a test that cannot be slow is noise, and would obscure a future regression in exactly the
tests that can be slow.
60_000per the #1302 precedent. Nothing else is in the diff.Follow-up, deliberately not here
The underlying cost is that
measure-prompt-surface.shspawnspython3once per file forinclude expansion. Making that a single pass would cut seconds off every invocation. Worth
doing — not worth coupling to an unblock-main commit.