Skip to content

test: vitest forks on Node 24 run with --no-wasm-code-gc - #705

Merged
allisonmahmood merged 2 commits into
mainfrom
fix/499-node24-vitest-wasm-code-gc
Oct 15, 2026
Merged

allisonmahmood merged 2 commits into
mainfrom
fix/499-node24-vitest-wasm-code-gc

Conversation

@allisonmahmood

Copy link
Copy Markdown
Owner

On Node 24, a vitest fork running PGlite can die with SIGTRAP from a V8 internal check (jit_page.has_value() or allocations_.erase(addr) == 1), which fails test (24) even when every test passed. It is nodejs/node#66366: every Node 24 release ships V8 13.6, which can free a Wasm import wrapper twice. Pinning a different 24.x patch does not help.

test/vitest.development.config.ts now sets vitest's test.execArgv to --no-wasm-code-gc on Node 24, decided by major version, and to nothing elsewhere. A comment beside it names nodejs/node#66366 and nodejs/node#66376 and says to remove the flag once CI's Node 24 is a release with the backport. Every other vitest config builds on that one, so the flag lives in one place:

  • test/vitest.config.ts: the root pnpm test, most packages and test:postgres-concurrency.
  • vitest.clerk.config.ts and vitest.content-store-live.config.ts: clerk-live runs on Node 24 in CI.

Forks on Node 22 and 26 get no extra flags. The workflow is unchanged, because CI's jobs read these configs.

Closes #499

Tested by hand

A throwaway test, not committed, logged each fork's process.execArgv:

Run Node 22.22.0 Node 24.20.0 Node 26.11.1
root config (pnpm test's) same as main main's + --no-wasm-code-gc same as main
packages/patchy local vitest run same as main main's + --no-wasm-code-gc same as main
packages/integrations local vitest run same as main main's + --no-wasm-code-gc same as main
vitest.postgres.config.ts (not run) --no-wasm-code-gc present no extra flags
vitest.content-store-live.config.ts no extra flags --no-wasm-code-gc present no extra flags

"Same as main" means identical to the forks' execArgv with main's configs. clerk-live needs real Clerk keys to run its suite, so I imported its config with placeholder keys instead: test.execArgv resolves to ["--no-wasm-code-gc"] on Node 24 and [] on 22 and 26.

  • Dev.test.ts and devResources.test.ts, the two files that aborted in CI, pass on Node 24 under the root config, and devResources.test.ts passes under packages/patchy's own config.
  • pnpm verify passed every stage on this commit: format, lint, typecheck, synth, test, postgres-concurrency, cli-smoke, tier2-smoke and browser.
  • The abort hit CI about twice a week and never reproduced locally, so a green run shows the flag is harmless rather than proving the abort is gone. If test (24) aborts on either check again, reopen flaky: Node 24's V8 aborts vitest forks running PGlite (nodejs/node#66366) #499.

Review

GPT 6.1 Sol (xhigh) found one low issue: the clerk-live and content-store-live configs stood alone, so their Node 24 forks missed the flag. The second commit makes them build on the development config too. Nothing else was found.

Surfaces walked: .github/workflows/ci.yml needs no change, as above. docs/DEVELOPMENT.md lists which Node versions CI runs, not per-version flags, so it stays accurate. No wire, CLI, dev-runner, vocabulary, migration or layout changes.

Not breaking: test configuration only.

Made by Claude Opus 5.5 in Claude Code, running in T3 Code.

@github-actions github-actions Bot added area:ci CI, shared testing infrastructure, development scripts and tooling size:s Under 100 changed lines labels Oct 15, 2026
Node 24's V8 (13.6, in every Node 24 release) can free a Wasm import
wrapper twice and abort a fork running PGlite (nodejs/node#66366), which
fails test (24) even when every test passed. The development config now
passes --no-wasm-code-gc to vitest forks on Node 24, and the main config
builds on it, so root, package-local and postgres-concurrency runs all
get it. Other Node versions get no extra flags.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
clerk-live runs on Node 24 in CI, and its forks missed the flag because
its config stood alone. Both live configs now spread the development
config, so every vitest config in the repo carries it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@allisonmahmood
allisonmahmood force-pushed the fix/499-node24-vitest-wasm-code-gc branch from 599ee27 to 665244e Compare October 15, 2026 22:24
@allisonmahmood
allisonmahmood merged commit df65c5b into main Oct 15, 2026
13 checks passed
@allisonmahmood
allisonmahmood deleted the fix/499-node24-vitest-wasm-code-gc branch October 15, 2026 22:36
allisonmahmood added a commit that referenced this pull request Oct 16, 2026
…u when they fail (#720)

Release 13's What's new entry, written from `c9b8fc4`, ahead of
deploying it. `patchy` and `CURRENT_RELEASE` move to `0.13.0`, so CLIs
and patch repos installed before this deploy are told to upgrade.

| Change | PRs |
| --- | --- |
| New: Home puts the patches you use first | #713, #716, #719 |
| New: Every patch in one list | #715 |
| Improved: Each patch's page leads with Open | #717 |
| New: See when your tools are failing | #718 |
| Fixed: Everyone has a name | #687 |
| Improved: Your company's look is easier to get right | #697, #696,
#703, #688 |
| Improved: Forms follow your look's error states | #691, #692 |
| Improved: Clearer answers when a publish goes wrong | #686, #685, #689
|
| Fixed: Your agent's Patchy commands are steadier | #695, #704, #680,
#681 |
| Behind the scenes: stricter checks on static pages and tools' database
requests; malformed requests are logged | #682, #693, #683 |
| Behind the scenes: usage numbers count every publish, sharing change
and restore | #698, #699, #700, #690 |
| Test and tooling only, no line | #705, #702, #701, #694, #684, #607 |

Made by Claude Opus 5.5 in Claude Code, running in T3 Code.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, shared testing infrastructure, development scripts and tooling size:s Under 100 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flaky: Node 24's V8 aborts vitest forks running PGlite (nodejs/node#66366)

1 participant