You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Run a curated subset of the official Node.js `test/parallel/` tests against secure-exec to systematically find compatibility gaps.
60
+
- Vendor tests, provide a `common` shim (mustCall, mustSucceed, tmpdir, fixtures), run each through `proc.exec()` in a fresh `NodeRuntime`, report per-module pass/fail/skip/error.
61
+
- Ratchet rule: once a test passes, it cannot regress without justification.
-[ ] Build test runner engine (`runner.ts`) + Vitest driver (`nodejs-suite.test.ts`) + manifest format (`manifest.json`). Runner creates fresh NodeRuntime per test, prepends common shim, captures exit code/stdio. Driver reads manifest, generates one Vitest test per entry, enforces ratchet.
65
+
-[ ] Vendor `test-path-*.js` from Node.js v22.14.0. Validate harness works. Target 100% pass rate (path is a pure polyfill via path-browserify, ~15 test files).
-[ ] CLI tool E2E validation: Pi, Claude Code, and OpenCode inside sandbox.
126
157
- Prove that real-world AI coding agents boot and produce output in secure-exec.
127
158
- Spec: `docs-internal/specs/cli-tool-e2e.md`
128
-
- Phases: Pi headless → Pi interactive/PTY → OpenCode headless (binary spawn + SDK) → OpenCode interactive/PTY → Claude Code headless → Claude Code interactive/PTY
129
-
- OpenCode is a Bun binary (hardest) — tests the child_process spawn path and SDK HTTP/SSE client path (not in-VM execution); done before Claude Code to front-load risk
- SDK, headless binary, and tool-use modes are passing for all three tools. Agentic workflow tests (multi-turn, npm install, npx, dev server lifecycle) also passing.
160
+
- Remaining work — full TTY / interactive mode for all three tools:
161
+
-[ ] Pi full TTY mode — BLOCKED: all 5 PTY tests skip. Pi CLI can't fully load in sandbox — undici requires `util/types` which is not yet bridged. Test infrastructure in place (TerminalHarness + kernel.openShell + HostBinaryDriver). Blocker: implement `util/types` bridge or workaround for undici dependency.
162
+
-[ ] Claude Code full TTY mode — BLOCKED: all 6 PTY tests skip. HostBinaryDriver + TerminalHarness infrastructure is in place, but boot probe fails — Claude Code's interactive startup requires handling workspace trust dialog and API validation that the mock server doesn't fully support. Blocker: mock server needs to handle Claude's full startup handshake.
163
+
-[ ] OpenCode full TTY mode — PARTIALLY WORKING: 4 of 5 PTY tests pass (TUI renders, input works, ^C works, exit works), but 'submit prompt and see response' test FAILS with waitFor timeout. Mock LLM response doesn't render on screen after submit. Also: HostBinaryDriver is copy-pasted across 3 interactive test files — needs extraction to shared module. Blocker: fix submit+response rendering through kernel PTY.
131
164
132
165
-[x] Review the Node driver against the intended long-term runtime contract. *(done — `.agent/contracts/node-runtime.md` and `node-bridge.md` exist)*
Copy file name to clipboardExpand all lines: docs/nodejs-compatibility.mdx
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,27 @@ The [project-matrix test suite](https://github.com/rivet-dev/secure-exec/tree/ma
108
108
109
109
To request a new package be added to the test suite, [open an issue](https://github.com/rivet-dev/secure-exec/issues/new?labels=package-request&title=Package+request:+%5Bpackage-name%5D).
110
110
111
+
## Known Unsupported npm Packages (Native Extensions)
112
+
113
+
These popular packages ship native binaries or platform-specific `.node` addons and cannot run inside a secure-exec V8 isolate. Native addons require Node's native module loader (`dlopen`), which is not available in the sandbox. The overlay module loader explicitly rejects `.node` files.
114
+
115
+
| Package | Weekly Downloads | Why It Fails | Pure-JS Alternative |
116
+
| --- | --- | --- | --- |
117
+
|[esbuild](https://npmjs.com/package/esbuild)| 116M | Spawns a platform-specific Go binary; JS API is a thin IPC wrapper |[`esbuild-wasm`](https://npmjs.com/package/esbuild-wasm) (same API, ~3x slower) |
|[next](https://npmjs.com/package/next)| 27M | Rust SWC compiler (`@next/swc-*`); also depends on esbuild | No pure-JS equivalent |
122
+
|[sass-embedded](https://npmjs.com/package/sass-embedded)| — | Wraps a native Dart executable |[`sass`](https://npmjs.com/package/sass) (dart2js compiled, pure JS) |
123
+
|[node-sass](https://npmjs.com/package/node-sass)| — | C++ LibSass binding via node-gyp (deprecated) |[`sass`](https://npmjs.com/package/sass)|
124
+
|[bcrypt](https://npmjs.com/package/bcrypt)| — | C++ binding via node-gyp |[`bcryptjs`](https://npmjs.com/package/bcryptjs) (pure JS) |
125
+
|[@swc/core](https://npmjs.com/package/@swc/core)| — | Rust/napi-rs transpiler |[typescript](https://npmjs.com/package/typescript)`transpileModule()` or [babel](https://npmjs.com/package/@babel/core)|
126
+
|[sharp](https://npmjs.com/package/sharp)| — | C++ libvips binding via prebuild |[jimp](https://npmjs.com/package/jimp) (pure JS, slower) |
127
+
|[better-sqlite3](https://npmjs.com/package/better-sqlite3)| — | C++ SQLite binding via node-gyp |[sql.js](https://npmjs.com/package/sql.js) (WASM-based SQLite) |
128
+
|[canvas](https://npmjs.com/package/canvas)| — | C++ Cairo/Pango binding via node-gyp |[@napi-rs/canvas](https://npmjs.com/package/@napi-rs/canvas) is also native; no pure-JS equivalent |
129
+
130
+
Packages in the [Tested Packages](#tested-packages) table that overlap with this list (e.g. `next`, `vite`) have fixtures that test module resolution and limited API surface, not the full native build pipeline.
131
+
111
132
## Logging Behavior
112
133
113
134
-`console.log`/`warn`/`error` are supported and serialize arguments with circular-safe bounded formatting.
0 commit comments