test(startup): 45s load budget for full-server-boot launcher tests (#542) - #560
Merged
Conversation
…et (#542) The three tests #542 reports failing on one machine are exactly the launcher tests that boot a full server inside spawnAndCollect's 8s cap while asserting exit 0. Same class as #538: 83204be measured server boot at ~31s under 14-way saturation on the machine that reproduced both issues (~1s unloaded), so a persistently loaded machine fails them deterministically — including in isolation, which is why #542's isolation runs did not exonerate load. Local quantification on a 12-core machine that does NOT reproduce the failure: under 12-way busy-loop saturation the three tests take 5.3s / 0.4s / 6.4s of the 8s budget — 80% consumed in the mildest version of the same conditions. A local fail-on-old is therefore not achievable on this machine (macOS scheduling keeps the boot just under the cap); the differential evidence carries over from 83204be's instrumented 1/7 -> 7/7 measurement on the reproducing machine, per docs/verification-principles.md's fallback. Five sites move 8s -> 45s, matching 83204be's budget: the three #542 tests, the hub-discovery sibling (same spawn shape, lighter path), and the E2 ENOENT test (boots the same server before reaching the spawn error). All five processes exit on their own on the happy path — `finish(1)` on ENOENT included — so the larger budget costs nothing except on a genuine failure. Fixes #542 Co-Authored-By: Claude Fable 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.
摘要
修 #542:三條 launcher-mode 測試在「某台機器一致失敗、另一台一致通過」——判別特徵是它們正好是在
spawnAndCollect8 秒上限內完整啟動 server 並斷言 exit 0 的三條測試。與 #538 同類(83204be 在重現機上實測飽和負載下 server boot ~31s,無載 ~1s),持續性背景負載(如背景 review 工作)讓它們連 isolation 跑都必然超時。五個同類站點預算 8s→45s,對齊 83204be。Diagnosis
spawnAndCollectcall sites, the three failing tests (plus two structural siblings) are the ones that boot a full server inside the cap and assert on its completed launch. Arg-validation and loop-guard sites exit before boot and are unaffected.The change
Five sites in
test/startup.test.jsmove8000→45000(83204be's budget):spawns claude through the provider registry,consumes --no-browser,launches codex app on macOS)E2: claude not foundtest (boots the same server before reaching the ENOENT)All five child processes exit on their own on the happy path (ENOENT path calls
finish(1)— verified inserver/index.js:644-652), so the timeout is a backstop, not a wait: a passing run's duration is unchanged.Verification
test/startup.test.jscomplete file: 64/64 pass.CCXRAY_HOME=$(mktemp -d) npm test: 2190/2190 pass, exit 0.docs/verification-principles.mdfallback: a local fail-on-old is not achievable on this machine (the failure needs the reproducing machine's sustained load profile; busy loops here max out at 80% budget erosion). The differential evidence for this failure class is 83204be's instrumented 1/7 fail → 7/7 pass under 14-way saturation on the machine that reproduced both test: index-fields.e2e importer case fails locally on main (expected 1 index line, found 0) #538 and Three launcher-mode tests fail on one machine, pass on another #542.Review gate
Trivial test-budget change (5 numbers, in-repo precedent 83204be, no production code touched) — submitted without a grok pass; say the word if you want one anyway.
Fixes #542
🤖 Generated with Claude Code