Skip to content

fix(patchy): the dev daemon on Node 24 runs with --no-wasm-code-gc - #704

Merged
allisonmahmood merged 1 commit into
mainfrom
fix/606-node24-wasm-code-gc
Oct 15, 2026
Merged

allisonmahmood merged 1 commit into
mainfrom
fix/606-node24-wasm-code-gc

Conversation

@allisonmahmood

Copy link
Copy Markdown
Owner

On Node 24, a patchy dev session can abort mid-session on an upstream V8 bug that frees a Wasm import wrapper twice (nodejs/node#66366, the bug behind #499). The dev daemon runs PGlite for the whole session, so it is exposed for as long as the session lives. The patchy package accepts Node 24, and agents often install it.

The CLI now starts the daemon with --no-wasm-code-gc when it runs on Node 24, decided by major version. Every other Node version spawns the daemon with exactly the arguments it got before. The flag goes on the daemon's own arguments because V8 flags are process-wide. A comment beside it names nodejs/node#66366 and nodejs/node#66376, and says the flag can go once engines no longer accepts a Node 24 without the backport. A focused test covers the argument choice for Node 22, 24 and 26 without spawning a daemon. The change stays inside the spawn, clear of the dev command's output.

Closes #606

Tested by hand

On a pnpm dev up environment with a tier 2 patch, patchy dev --json ran through the environment's packed CLI (0.12.0 from this branch), then I read the daemon's /proc/<pid>/cmdline:

CLI Daemon command line Session
packed, Node 24.20.0 node --no-wasm-code-gc …/patchy/dist/devChild.js <stateDir> <nonce> healthy, page 200
packed, Node 26.11.1 node …/patchy/dist/devChild.js <stateDir> <nonce> healthy, page 200
source (tsx), Node 24.20.0 node --import …/tsx/dist/loader.mjs --conditions=development --no-wasm-code-gc …/src/devChild.ts <stateDir> <nonce> healthy

The source run shows the CLI's own execArgv carries through unchanged, with the flag appended.

  • devLifecycle.test.ts passes on Node 24, including the real daemon lifecycle cases.
  • pnpm verify passed every stage on this commit: format, lint, typecheck, synth, test, postgres-concurrency, cli-smoke, tier2-smoke and browser.
  • GPT 6.1 Sol reviewed at xhigh and found nothing to fix.

Surfaces walked: no wire, CLI command, flag, exit code or output changes, so packages/patchy/README.md, ADR-0004 and the global skill stay accurate. No dev-runner, vocabulary, migration, company-resource, served-page or layout changes either.

Not breaking: only the arguments of the local dev daemon on Node 24 change.

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

@github-actions github-actions Bot added area:cli Touches the cli area size:s Under 100 changed lines labels Oct 15, 2026
Node 24's V8 can free a Wasm import wrapper twice (nodejs/node#66366),
and the `patchy dev` daemon runs PGlite for the whole session, so it can
abort mid-session. The daemon now starts with --no-wasm-code-gc when
the CLI runs on Node 24; every other Node version spawns it with
exactly the arguments it got before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@allisonmahmood
allisonmahmood force-pushed the fix/606-node24-wasm-code-gc branch from d58ffb0 to 969ee00 Compare October 15, 2026 22:12
@allisonmahmood
allisonmahmood merged commit 322b5a5 into main Oct 15, 2026
13 checks passed
@allisonmahmood
allisonmahmood deleted the fix/606-node24-wasm-code-gc branch October 15, 2026 22:24
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:cli Touches the cli area size:s Under 100 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(patchy): patchy dev on Node 24 can abort on the V8 Wasm bug from #499

1 participant