Skip to content

fix: block Node 24 WASM crash path#159

Open
zaidazmi wants to merge 1 commit into
colbymchenry:mainfrom
zaidazmi:codex/block-node-24-wasm-crash
Open

fix: block Node 24 WASM crash path#159
zaidazmi wants to merge 1 commit into
colbymchenry:mainfrom
zaidazmi:codex/block-node-24-wasm-crash

Conversation

@zaidazmi
Copy link
Copy Markdown

Summary

  • block Node.js 24+ before CodeGraph starts tree-sitter WASM grammar compilation
  • reuse the compatibility check for both CLI startup and library init/open paths
  • narrow package engine metadata and README guidance to supported Node 18/20/22
  • add unit coverage for version parsing, unsafe-runtime blocking, override behavior, and the recovery banner

Repro

On Node v24.13.0, before this fix, the extraction suite crashed during grammar compilation with Fatal process out of memory: Zone. Node v20.19.4 completes the same extraction suite successfully.

Test plan

  • npx vitest run __tests__/node-version-check.test.ts
  • npm run build
  • node dist/bin/codegraph.js --version on Node v24.13.0 exits with the unsupported-runtime banner
  • CODEGRAPH_ALLOW_UNSAFE_NODE=1 node dist/bin/codegraph.js --version on Node v24.13.0 prints the banner and version
  • direct library construction on Node v24.13.0 throws the unsupported-runtime banner before grammar compilation
  • PATH="/Users/zaidazmi/.nvm/versions/node/v20.19.4/bin:/Users/zaidazmi/.codex/tmp/arg0/codex-arg0N0CH7a:/Users/zaidazmi/.bun/bin:/Users/zaidazmi/.antigravity/antigravity/bin:/Users/zaidazmi/.opencode/bin:/Users/zaidazmi/.nvm/versions/node/v24.13.0/bin:/Users/zaidazmi/.rbenv/shims:/Users/zaidazmi/.local/pipx/venvs/pip/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/zaidazmi/.rbenv/shims:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pkg/env/active/bin:/opt/pmk/env/global/bin:/Library/Apple/usr/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/zaidazmi/.cargo/bin:/Users/zaidazmi/.local/bin:/Users/zaidazmi/Library/Android/sdk/emulator:/Users/zaidazmi/Library/Android/sdk/platform-tools:/Users/zaidazmi/.local/bin:/opt/homebrew/opt/fzf/bin:/Users/zaidazmi/.lmstudio/bin:/Applications/Codex.app/Contents/Resources" npm run build
  • PATH="/Users/zaidazmi/.nvm/versions/node/v20.19.4/bin:/Users/zaidazmi/.codex/tmp/arg0/codex-arg0N0CH7a:/Users/zaidazmi/.bun/bin:/Users/zaidazmi/.antigravity/antigravity/bin:/Users/zaidazmi/.opencode/bin:/Users/zaidazmi/.nvm/versions/node/v24.13.0/bin:/Users/zaidazmi/.rbenv/shims:/Users/zaidazmi/.local/pipx/venvs/pip/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/zaidazmi/.rbenv/shims:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pkg/env/active/bin:/opt/pmk/env/global/bin:/Library/Apple/usr/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/zaidazmi/.cargo/bin:/Users/zaidazmi/.local/bin:/Users/zaidazmi/Library/Android/sdk/emulator:/Users/zaidazmi/Library/Android/sdk/platform-tools:/Users/zaidazmi/.local/bin:/opt/homebrew/opt/fzf/bin:/Users/zaidazmi/.lmstudio/bin:/Applications/Codex.app/Contents/Resources" npm test

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.

1 participant