Skip to content

node-pinned + bun-pinned conformance lanes - #109

Merged
lann merged 1 commit into
mainfrom
add-node-bun-conformance-harnesses
Aug 11, 2026
Merged

node-pinned + bun-pinned conformance lanes#109
lann merged 1 commit into
mainfrom
add-node-bun-conformance-harnesses

Conversation

@lann

@lann lann commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Adds Node.js and Bun as pinned conformance lanes in the existing tools/shell driver — investigation first (per dispatch), then implementation once both proved blocker-free: both runtimes run the unmodified shell bundle at exact Deno-lane parity (1254/0/95, 59/59 files, sub-second).

What

  • node-pinned — node v26.7.0 (nodejs.org tarball, sha256-verified, both linux arches), required gate in just shells. Exact parity with zero flags: wasm JSPI is default-on in node ≥ 26, as docs/architecture.md §3's table already recorded.
  • bun-pinned — bun v1.3.14 (GitHub release zip, sha256-verified, both arches), findings-only until it has a CI track record (the WebKit-lane precedent), riding in just shells with exit-0-on-deviation.

How

One bundle, every lane: node/bun run tools/shell/host-node.mjs, an unbundled ~30-line preamble that installs the entry's two host capabilities (binary reads, print) and imports dist/entry.mjs (byte-identical copy; bare .js parses as CJS under node with no package.json above it). entry.ts gains first-class node/bun engine detection and identity reporting. No changes to harness/src/, runtime/src/, or contracts.

Empirical record (linux-arm64 dev box, 2026-08-11)

runtime config result
node 26.7.0 stock exact parity, full capability matrix
node 24.18 LTS --experimental-wasm-jspi 2 real deviations (async/dont-block-start — V8 13.6's older JSPI vintage); deliberately not laned, recorded in the expectation header
bun 1.3.14 stock JSPI on by default, but multi-memory OFF → 174 failures ("at most one Memory section" — the CABI needs >1 memory per core module, the old WebKit-lane cap)
bun 1.3.14 BUN_JSC_useWasmMultiMemory=1 (driver-set) exact parity

The bun flag is an unstable surface (bun warns so); the pin freezes it, and the expectation header requires re-verification on any re-pin. memory64/relaxedSimd probe false on bun — nothing in the current corpus needs either.

Why lanes at all (docs revision)

docs/architecture.md §3 previously ruled Node "not a lane — Deno substitutes". These lanes add embedding coverage, not engine coverage: module loading, event-loop integration, and runtime I/O quirks — e.g. node's pooled Buffer, whose pool-backed .buffer must never reach WebAssembly APIs (handled + documented in the host preamble).

Gates run

  • just shells — sm-pinned OK, node-pinned OK, bun-pinned OK (jsc-pinned arch-skipped here; x64 leg covers it in CI)
  • just conformance — Deno lane green (69 passed)
  • deno check clean on all touched TS; deno lint findings in tools/shell are pre-existing (no-import-prefix on files this PR didn't introduce)

Two new pinned lanes in the tools/shell driver, running the SAME bundle
as the jsshell lanes via an unbundled host preamble
(tools/shell/host-node.mjs: binary reads that copy out of node's pooled
Buffer, print -> console.log; dist/entry.mjs is a byte-identical copy
because node parses bare .js as CJS):

* node-pinned — node v26.7.0, REQUIRED gate, both arches. Exact
  Deno-lane parity with no flags (JSPI default-on in >= 26): 1254/0/95,
  full capability matrix. Node 24 LTS deliberately not laned: JSPI is
  flag-gated there and its older V8 13.6 vintage deviates on 2
  dont-block-start commands (recorded in the expectation header).
* bun-pinned — bun v1.3.14, findings-only until a track record (the
  WebKit-lane precedent). Exact Deno-lane parity under
  BUN_JSC_useWasmMultiMemory=1 (driver-set; stock bun ships wasm
  multi-memory off and fails 174 commands — the CABI needs >1 memory
  per core module). JSPI is on by default in stock bun.

Both fetched sha256-verified from official release channels
(pins.json). docs/architecture.md §3's Node row revised: these lanes
add EMBEDDING coverage (module loading, event loop, pooled-Buffer I/O),
not engine coverage — V8/JSC were already exercised.

Measured on this box (linux-arm64): all three shells-recipe lanes OK,
59/59 files each, sub-second corpus runs.
@lann
lann enabled auto-merge August 11, 2026 14:11
@lann
lann merged commit 50778a1 into main Aug 11, 2026
4 checks passed
@lann
lann deleted the add-node-bun-conformance-harnesses branch August 11, 2026 15:08
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