Skip to content

test(startup): 45s load budget for full-server-boot launcher tests (#542) - #560

Merged
lis186 merged 3 commits into
mainfrom
fix/542-launcher-test-load-budget
Aug 18, 2026
Merged

test(startup): 45s load budget for full-server-boot launcher tests (#542)#560
lis186 merged 3 commits into
mainfrom
fix/542-launcher-test-load-budget

Conversation

@lis186

@lis186 lis186 commented Aug 18, 2026

Copy link
Copy Markdown
Owner

摘要

#542:三條 launcher-mode 測試在「某台機器一致失敗、另一台一致通過」——判別特徵是它們正好是spawnAndCollect 8 秒上限內完整啟動 server 並斷言 exit 0 的三條測試。與 #538 同類(83204be 在重現機上實測飽和負載下 server boot ~31s,無載 ~1s),持續性背景負載(如背景 review 工作)讓它們連 isolation 跑都必然超時。五個同類站點預算 8s→45s,對齊 83204be

Diagnosis

  • The discriminating feature: of all spawnAndCollect call 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.
  • Three launcher-mode tests fail on one machine, pass on another #542's "fails in isolation too" observation is consistent with load, not evidence against it: the load on the reproducing machine was sustained (background review jobs), so isolation doesn't relieve it. 83204be (the test: index-fields.e2e importer case fails locally on main (expected 1 index line, found 0) #538 fix, same machine, same week) measured boot at ~31,097ms under 14-way saturation — 4× the 8s budget.
  • Local quantification on this 12-core machine (which does not reproduce): under 12-way busy-loop saturation the three tests consume 5.3s / 0.4s / 6.4s of the 8s budget — 80% erosion in the mildest form of the same conditions; 24-way oversubscription stays under the cap because macOS scheduling protects the foreground work.

The change

Five sites in test/startup.test.js move 800045000 (83204be's budget):

All five child processes exit on their own on the happy path (ENOENT path calls finish(1) — verified in server/index.js:644-652), so the timeout is a backstop, not a wait: a passing run's duration is unchanged.

Verification

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

Justin Lee and others added 3 commits August 18, 2026 09:56
…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>
@lis186
lis186 merged commit 883ce80 into main Aug 18, 2026
3 checks passed
@lis186
lis186 deleted the fix/542-launcher-test-load-budget branch August 18, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Three launcher-mode tests fail on one machine, pass on another

1 participant