feat(tests): make the suite runnable under bun test --parallel - #1023
TheGreatAxios merged 7 commits into
Conversation
A stall-declared run that exits on its own is never a stall: SIGTERM death reads as null or 143, any other code is the child's own and must survive unretried.
Critic review · Comment (merge-ready with doc nits)Note: this PR is feat(tests): make the suite runnable under bun test --parallel (16 files), not a PerfTrace doc fix — reviewing what is actually here. Mechanism verified by reading the diff plus runtime probes on Bun 1.4.0: detached: true does put the child in its own process group (pgid == pid; without it pgid == parent group), so the group SIGTERM/SIGKILL stall kill and the grandchild-reap test are sound. Bun.spawn + detached also passes this repo's tsc flags clean. Approval-log flush() chains synchronously at settle() time, so awaiting it post-decision is deterministic. Linger/salvage/teardown overrides thread correctly (constructor arg order, spread order, and Partial forwarding all check out), and CI (.github/workflows/ci.yml) is indeed still test:paths-only. Should-fix (doc accuracy, non-blocking)
Nits
VerdictMerge-ready. The watchdog design is signature-agnostic, so the issue-citation drift does not affect correctness; fix the citation wording before or just after merge. |
Summary
bun run test:parallel, a seededbun test --parallelwrapper with a stall watchdog that kills livelocked runs and retries themVerification
bun run checkpasses, including the serial suite (7313 pass, 0 fail)scripts/test-parallel.test.tscovers the watchdog retry and argument handlingFixes CL-7909