Skip to content

test(vitest): run pool workers with the WASM runtime flags (#1779) - #2046

Merged
colbymchenry merged 1 commit into
mainfrom
fix/1779-vitest-worker-wasm-flags
Sep 27, 2026
Merged

colbymchenry merged 1 commit into
mainfrom
fix/1779-vitest-worker-wasm-flags

Conversation

@colbymchenry

Copy link
Copy Markdown
Owner

Carries @danusha2345's #1883 onto current main (their commits, authorship preserved; the CHANGELOG entry is collected separately to avoid conflicts between the fix PRs).

Validation

Fixes #1779

🤖 Generated with Claude Code

A vitest pool worker is the one launch path that never received
`--liftoff-only`, so the suite compiled tree-sitter grammars on the
turboshaft tier. Once ~640 extraction tests have warmed a grammar function
up, its background tier-up job (Turboshaft LoopUnrollingPhase, symbolized
from the native stack) exhausts a compiler Zone and aborts the worker:
`Fatal process out of memory: Zone`, which vitest reports only as "Worker
exited unexpectedly" with the file's remaining tests unrun.

Pass WASM_RUNTIME_FLAGS through poolOptions.forks.execArgv, so the test
process matches the bundled launcher, the CLI re-exec and refresh-launcher.
V8 flags are process-global, so parse worker threads are covered too.

Linux x64, Node 24.15, `__tests__/extraction.test.ts` (655 tests):
without the flag 3 of 4 runs died at the same test (639 passed);
with it 2 of 2 passed, in 19–24s instead of 34–41s. Neither
`--no-wasm-loop-unrolling` nor `--no-wasm-dynamic-tiering` prevents it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 565ec81)
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.

Windows: vitest pool worker killed by a V8 compiler-zone OOM, invisible in the JSON report

2 participants