ReviewOS

home-lang/home

js/node corpus baseline: 233/267 pass, with 6 crashes and 3 hangs to triage

#621
Closed glennmichael123 opened this 10 days ago ·
10 days ago

Purpose

A measured, reproducible starting point for js/node parity. Every previous run of the scanner on macOS reported every file as a crash (it bounded runs with coreutils timeout, which macOS does not ship), so there was no usable baseline. That is fixed in 475621266/acbe0c0c8; this issue records what the corrected tool actually finds and tracks the remainder.

Baseline

Build: zig build debug -Denable_jsc=true at native artifact source pin 4982b91e3702094330f3be3883354c52b8c01323, WebKit cd821fecca0d39c8, Darwin arm64.

scripts/vm-corpus-scan.sh js/node <out.tsv> 25

267 files: 233 pass / 25 fail / 6 crash / 3 hang.

Fixed while establishing it (each verified against the pinned Bun control, not just "no longer crashes"):

  • c90e1c7b0 — path.format overran its buffer by the dot formatExt inserts. js/node/path is now 19/19.
  • 47586f1ee — HTTP/2 header padding could push a single-frame header block onto the CONTINUATION path, which then sliced a full frame payload out of a shorter block. node-http2-continuation.test.ts 9/9, matching Bun.
  • 6492703f7 — BlockList.check chose the IPv4 mask whenever both addresses answered as_v4(), so an IPv4-mapped IPv6 subnet reached it with an IPv6 prefix and underflowed 32 - prefix. node-net.test.ts 40 pass / 4 skip / 0 fail, matching Bun.

Remaining crashes and hangs

filestatusnote
js/node/http2/node-http2.test.jscrash#620 — loader refuses require() of a linked ESM record; Bun runs 287 tests here
js/node/http/node-http.test.tscrashnot yet triaged
js/node/http/node-http-agent-tls-options.test.mtscrashnot yet triaged
js/node/process/process.test.jscrashnot yet triaged
js/node/util/bun-inspect.test.tscrashnot yet triaged
js/node/vm/happy-dom-vm-16277.test.tscrashnot yet triaged
js/node/dns/node-dns.test.jshangexceeds a 25s bound
js/node/http/node-http-backpressure-max.test.tshangexceeds a 25s bound
js/node/worker_threads/worker_heap_snapshot_gc.test.tshangexceeds a 25s bound

Notes on the failures

Several of the 25 fail rows are dependency provisioning, not runtime behaviour — Could not resolve: "verdaccio/bin/verdaccio", ENOENT ... 'body-parser', bun install failed. Those belong to #618 and should not be counted as parity gaps. The rest are genuine assertion differences and want individual triage.

How to use this

Classify each remaining row against the pinned Bun control before treating it as a Home gap — a build of the pin lives at ~/Code/bun/build/release/bun and several corpus expectations fail there too. Crashes first: they are memory-safety defects, and all three fixed above turned out to be small, self-contained divergences from a correction Bun had already made on its Rust side.

Parent parity tracker: #66

10 days ago

Baseline corrected after provisioning, and every failure classified against pinned Bun

Two things changed since the numbers above.

The corpus's npm dependencies were never installed. f2ee14f4d adds scripts/provision-corpus-deps.sh, a --frozen-lockfile install that reproduces the pinned tree (2,896 packages, ~20s). Files importing verdaccio, happy-dom, strip-ansi, detect-libc or body-parser had been aborting before their first test, and the scanner counted those aborts as crashes — which is most of what made the crash surface look large. js/node/vm/happy-dom-vm-16277.test.ts went straight from "crash" to passing. The scanner also gained a deps status so this can never be misread as a runtime defect again.

Current baseline — 267 files: 242 pass / 21 fail / 3 hang / 1 crash (from 233 / 25 / 3 / 6).

Fixed since: 27e2cfc0f (cluster IPC null-deref panic — handleInternalMessagePrimary unwrapped the worker and callback without the isReady() guard Bun's Rust has) and e0e0c363e (legacy url.parse accepted [:::1], [::banana] and [\n::1]).

Every remaining failure, against the pinned Bun control

Six of the 21 are not Home gaps — the pinned Bun build fails them identically, so they are corpus expectations that need their own decision, not parity work:

fileHomeBun
fs/abort-signal-leak-read-write-file.test.ts0 / 10 / 1
net/double-connect.test.ts0 / 10 / 1
readline/pause_stdin_should_exit.test.ts0 / 10 / 1
tls/node-tls-connect.test.ts28 / 228 / 2
url/pathToFileURL.test.ts1 / 11 / 1
worker_threads/15787.test.ts0 / 10 / 1

The rest are real, and this is the whole remaining js/node gap — 13 files, 82 tests (excluding the two fixed above):

fileHomeBungap
crypto/node-crypto.test.js159 / 28187 / 028
http2/h2-conformance.test.ts4 / 1923 / 019
fs/fs.test.ts248 / 14260 / 212
buffer.test.js500 / 7507 / 07
zlib/zlib-estimated-size-gc.test.ts2 / 46 / 04
vm/vm-sourceUrl.test.ts1 / 23 / 02
module/sourcemap.test.js12 / 214 / 02
process/process.test.js100 / 2102 / 02
assert/assert-typedarray-deepequal.test.ts44 / 145 / 01
module/node-module-module.test.js29 / 130 / 01
module/sourcemap-simd.test.ts23 / 124 / 01
string_decoder/string-decoder.test.js84 / 185 / 01
watch/fs.watch.test.ts39 / 140 / 01

Plus the one crash (http2/node-http2.test.js, #620) and three hangs (dns/node-dns.test.js, http/node-http-backpressure-max.test.ts, worker_threads/worker_heap_snapshot_gc.test.ts), all still untriaged.

crypto overlaps #587 and h2-conformance overlaps #426, so those two — 47 of the 82 — likely belong to work already in flight. string_decoder's single failure is a subprocess that should throw ERR_STRING_TOO_LONG for a buffer over String::MaxLength and instead exceeds a 5s bound.

Every fix landed so far followed the same shape: Home mirrors Bun's pre-fix Zig, Bun corrected it on the Rust side, and the port is a few lines. Reproduce with scripts/vm-corpus-scan.sh js/node <out.tsv> 25 after running the provisioning script.

10 days ago

Buffer gap resolved by #635 / 6fe245d.

The previous 500 pass / 7 fail row now reaches full pinned release parity: unchanged upstream js/node/buffer.test.js is 507 pass / 0 fail and the copied reduced corpus is also 507 pass / 0 fail / 0 unsupported / 0 todo. Debug correctly reports 506 pass plus the one upstream performance skip; the reduced corpus mirrors it as one todo.

This is a real implementation fix: native validator call/construct semantics, native encoding paths, copied Bun SIMD policy, and correct build-mode metadata. The fabricated throughput fixture and exact-source constructor rewrite were deleted.

The full 267-file js/node scan was not rerun in this batch, so the aggregate baseline totals above remain the last measured totals; only the seven-test Buffer row is now known resolved.

10 days ago

Source-map SIMD row is now fully green on main via #636:\n\n- Debug upstream: 24/24, 0 fail, including the required simd consumed / scalar-no-marker assertions\n- Debug tracked copy: 24/24, 0 fail, now automatically routed through the full native VM\n- ReleaseFast upstream: 24/24, 0 fail\n- ReleaseFast tracked copy: 24/24, 0 fail\n- commits: a380b8b and 05cc558\n\nThe old reduced adapter failure was not accepted as parity: this test uses Bun.spawn plus Bun.stdin and now takes the same existing full-VM route as other runtime-owned-service matrices.\n\nFresh standalone spot checks also show several rows in this issue are stale:\n- js/node/module/sourcemap.test.js: 14/14\n- js/node/assert/assert-typedarray-deepequal.test.ts: 45/45\n- js/node/module/node-module-module.test.js: 30/30\n- js/node/string_decoder/string-decoder.test.js: 85/85\n- js/node/watch/fs.watch.test.ts: 40 pass, 2 Windows-only skips, 0 fail\n\nThose spot checks are not an aggregate baseline refresh, so I am leaving the issue title/count unchanged until the full scan is rerun.

10 days ago

Two more measured js/node rows are now fully green on main:

  • crypto/node-crypto.test.js — refreshed before state 159/28, now 187/0 in Debug and true ReleaseFast via #638 / 635328f35. The checked-in copy is also 187/0 in Debug.
  • fs/fs.test.ts — refreshed before state 258/4/7 skip, now 262/0/7 upstream platform skips in Debug and true ReleaseFast via #637 / d8cdf06d8. Debug executed 5,405 assertions.

The adjacent unmodified js/bun/util/bun-cryptohasher.test.ts matrix is also 397/0 with 55,642 assertions in both modes, and its checked-in copy is 397/0 in Debug.

The older fs row in this issue (248/14 versus Bun 260/2) was stale relative to the current pinned source/build; the fresh pre-port measurement isolated four remaining Home failures, all now fixed. The full 267-file scan was not rerun in this batch, so the aggregate baseline count remains the last measured aggregate rather than an inferred total.

10 days ago

The stale HTTP/2 crash row has now been cleared on main by 7b12502.

The exact upstream js/node/http2/node-http2.test.js file runs as part of the final five-file matrix, which is green in both Debug and ReleaseFast: 329 pass / 6 upstream-authored memory-leak skips / 0 fail / 12,246 assertions total. The complete corpus scanner was not rerun in this batch, so the aggregate 267-file baseline in the issue body is not being revised here.

10 days ago

Three additional rows from the measured table are now cleared or proven stale on current main:

  • js/node/vm/vm-sourceUrl.test.ts: 3/3 in Debug and ReleaseFast via d2cd9444c. Home now preserves Bun error-divot semantics across same-realm builtin errors, subclasses, cross-realm errors, and eval sourceURL frames.
  • js/node/process/process.test.js: exact pinned parity at 102 runnable passes / 1 upstream skip / 3 upstream TODOs / 0 fail / 282 assertions in Debug; the ReleaseFast primary matrix is also green.
  • js/node/zlib/zlib-estimated-size-gc.test.ts: 6/6 in both Debug and ReleaseFast.

Adjacent verification after the VM fix is also green: inspect/reportError/console 78/78, and error-printer coverage excluding the separately tracked BuildMessage case is 87 pass / 1 filtered / 0 fail in ReleaseFast.

The complete 267-file scanner was not rerun in this batch, so the aggregate title and baseline totals remain historical measured values rather than an inferred subtraction.

10 days ago

All three historical hang rows are now cleared against byte-identical pinned tests on current main (f2b5792dffbeedfdad9a554fce1504e797e7aa7c):

  • js/node/dns/node-dns.test.js: Home Debug 69 pass / 0 fail / 226 assertions in 0.91s; pinned Bun 69/0/226 in 1.08s.
  • js/node/http/node-http-backpressure-max.test.ts: Home Debug completes the unchanged 4 GiB maximum-body/backpressure workload, 1 pass / 0 fail in 28.11s; pinned Bun 1/0 in 12.94s. The old 25s scanner bound misclassified this as a hang.
  • js/node/worker_threads/worker_heap_snapshot_gc.test.ts: Home Debug functional test 1/0. The release-strength workload was also run directly with no reductions: 15 fresh worker processes × 300 heap snapshots, all passed in 23.54s. Pinned Bun's unchanged release test is 1/0 with all 15 assertions in 23.60s.

SHA-256 checks confirm all three tests and the worker fixture exactly match ~/Code/bun/test. No corpus edits, skips, timeout changes, workload reductions, or runtime changes were used. I am leaving the historical aggregate title in place until the full js/node scanner is refreshed.

10 days ago

Fresh full js/node refresh is complete on main at 2fc1d72e8:

SUB=js/node pass=260 fail=6 crash=0 hang=0 deps=0 oom=1 total=267

This supersedes the original 233 pass / 25 fail / 6 crash / 3 hang baseline. The scanner itself now classifies its log file in place instead of copying multi-hundred-MiB Debug output into a Bash variable, and exports Bun's canonical BUN_DEBUG_QUIET_LOGS=1 before launching Debug. Its RSS stayed flat through all 267 files.

The seven non-pass classifications are fully accounted for:

  • node-http-backpressure-max.test.ts: unchanged 4 GiB workload passes standalone 1/1 in Home (28.11s), but correctly trips the scanner's 4 GiB whole-process-group RSS ceiling.
  • process.test.js: transient scan assertion; immediate clean replay is 102 pass / 1 upstream platform skip / 3 upstream TODO / 0 fail / 282 assertions.
  • double-connect.test.ts: exact pinned parity; both Home and pinned Bun fail because an upstream .failing test now passes and must be unmarked upstream.
  • readline.node.test.ts: exact pinned parity at 54 pass / 25 fail / 241 assertions.
  • node-tls-connect.test.ts: exact pinned parity at 28 pass / 1 skip / 2 live peer-certificate failures / 106 assertions.
  • fs.test.ts and pause_stdin_should_exit.test.ts: Home-only mirror-root topology failures, now isolated in #646. Their byte-identical sources expect Bun's checkout-level test/ directory, while Home physically stores the mirror below packages/runtime/test/bun-corpus.

The same commit also fixes explicit corpus companion-file execution: after switching to the corpus root, Home now keeps ./ path semantics instead of converting absolute files into bare test-name filters. This clears unchanged node-http-connect.test.ts (6 pass / 4 upstream TODO / 0 fail), node-http-proxy-url.test.ts (2/2), and node-stream.test.js (65 pass / 5 upstream TODO / 0 fail). The canonical quiet flag clears child_process_ipc_large_disconnect.test.js (1/1) without hiding output or changing the test.

Verification: Debug build 21/21, focused dispatcher unit pass, zig fmt --check, bash -n, git diff --check, all exact suites above, and the complete 267-file scan. No corpus edits, skips, assertion/deadline/workload changes, or external-runtime delegation.

10 days ago

All originally measured crash and hang rows are cleared, and the refreshed 267-file baseline plus its remaining classifications are recorded above. The only Home-specific test-root topology boundary is split into #646; whole-suite parity remains tracked in #66.

Sign in to comment on this issue.