Repository navigation
fix(test): make the test gate honest about Bun's limits under host load - #3231
Merged
Merged
Conversation
Three separate causes made bun run check fail on a loaded host: - bunfig [test] timeout has never been read by Bun, so every test ran under the 5000 ms default rather than the intended 20 s. Shell suites that take under 1 s alone reached 5 s at load near 40. scripts/test.ts now passes --timeout, which also reaches --parallel workers. - Bun before 1.4.3 can spin forever in Bun.spawnSync (oven-sh/bun#44581). scripts/test.ts now warns on such a version; the remedy is bun upgrade. - settle() gave an accepted dispatch 250 ms to publish its terminal, and it took 425 ms at load 39. Accepted dispatches now get 15 s; tests that expect a drop use settleDrop, with the old window. The sandbox denial test relied on one read at a fixed 2500 ms delay. It now repeats the read until a denial is observed. The assertion is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
bun run checkfailed on the Mac mini under load and sometimes hung until the supervisor's 1200 s limit. The failures looked like product failures but were not.Causes and fixes
bunfig.toml[test] timeoutis ignored on Bun 1.4.2 and 1.4.4, so the limit was 5000 ms instead of the intended 20 smigrate-config-dirtakes 0.7 s alone and hit 5 s under loadscripts/test.tspasses--timeout=20000; the dead key is removedBun.spawnSync(oven-sh/bun#44581)spawn_syncbeside a zombie childscripts/test.tswarns on an affected Bun. It does not refuse, so nobody is blocked before the host is upgradedsettle()gave accepted dispatches 250 mssettleDropwith the old windowEvidence
Full suite at nice 15, as the supervisor runs it, on Bun 1.4.4:
At load above 100 the shell suites still reach the 20 s limit, so this does not make the gate immune to extreme overload.
bun run checkpasses on Bun 1.4.4.🤖 Generated with Claude Code