Skip to content

Add official Node.js core module test harness#693

Open
brandonpayton wants to merge 132 commits into
mainfrom
integration/kad-nct-node-core-tests
Open

Add official Node.js core module test harness#693
brandonpayton wants to merge 132 commits into
mainfrom
integration/kad-nct-node-core-tests

Conversation

@brandonpayton

@brandonpayton brandonpayton commented Jun 13, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds an official Node.js core JavaScript test harness for Kandelo's
SpiderMonkey-backed Node-compatible runtime. The harness is pinned to upstream
nodejs/node v22.0.0 at peeled commit
12fb157f79da8c094a54bc99370994941c28c235 and can run the full upstream
test/parallel/test-*.js suite on both Kandelo hosts.

The branch includes:

  • Scope documentation for the official-test adoption boundary.
  • scripts/run-node-core-official-tests.sh and
    scripts/node-core-official-runner.ts.
  • Full-suite discovery of upstream test/parallel/test-*.js; the checked-in
    manifest is now only for smoke, targeted reruns, and explicit SKIP/XFAIL
    support-boundary entries.
  • Browser test-runner support for serving the upstream source fixture tree,
    generated prelude, and runtime wasm through a same-origin Vite route.
  • Recorded Node-host and browser-host result artifacts under
    test-runs/node-core-official-*.
  • Runtime compatibility fixes and explicit support-boundary classifications
    discovered while expanding from the original smoke manifest to the full suite.

Validation Status

Pinned source:

  • Repo: https://github.com/nodejs/node.git
  • Tag: v22.0.0
  • Tag object: ec49bec48284ab642db1d109d917c6ae3b695c13
  • Peeled commit: 12fb157f79da8c094a54bc99370994941c28c235
  • Suite: upstream test/parallel/test-*.js
  • Full-suite selected count: 3382

Authoritative full-suite correction run from kad-nct.17:

Host Artifact Selected PASS FAIL SKIP Status
Node test-runs/node-core-official-node-full-kad-nct17/ 3382 7 3375 0 Authoritative full run
Browser test-runs/node-core-official-browser-full-kad-nct17-host-timeout/ 3382 3382 reported 0 reported 0 reported Not authoritative; sentinel exposed false PASS handling

Browser authority check from kad-nct.17:

Host Artifact Selected PASS FAIL Result
Node sentinel test-runs/node-core-official-node-sentinel-kad-nct17/ 1 0 1 Correctly failed a deliberate throwing test
Browser sentinel test-runs/node-core-official-browser-sentinel-kad-nct17/ 1 1 0 Incorrectly reported PASS for the same throwing test

The browser false-PASS issue was tracked by kad-nct.18 and later fixed, but
this PR body does not claim an authoritative browser full-suite PASS/FAIL/SKIP
count until a post-fix browser full-suite rerun is recorded.

Latest committed Node-host full-suite rerun from kad-nct.48:

Host Artifact Selected PASS FAIL SKIP Status
Node test-runs/node-core-official-node-full-kad-nct48-rerun/ 3382 1253 2126 3 Latest committed Node full-suite hard count; not final after all later follow-up MRs

kad-nct.48 reran the Node-host full suite after the first wave of semantic
fixes had landed, then split the remaining tail into narrower follow-up beads.
It supersedes the original 10-test smoke-manifest numbers for PR status, but it
is still not a final green run.

The original 10-test manifest artifacts remain useful smoke history only:

  • test-runs/node-core-official-node-final/
  • test-runs/node-core-official-browser-final/

Those selected-manifest counts must not be used as this epic's pass/fail/skip
status.

Failure Tracking

The first authoritative Node-host full run (kad-nct.17) grouped failures into
tracked follow-up beads:

Group Count Tracking
Node test/common unexpected global leak assertion 1455 primary / 3354 contains-pattern kad-nct.11
Missing module/API surface 457 primary kad-nct.21
TypeError semantic mismatches 447 primary kad-nct.23
Assertion semantic mismatches 391 primary kad-nct.23, plus selected narrow bugs kad-nct.12-kad-nct.15
http.createServer missing 269 primary kad-nct.20
Shared tmpdir/process identity collision 194 primary kad-nct.19
cluster.fork missing 48 primary kad-nct.22
child_process.fork / cp.fork missing 33 primary kad-nct.22
Timeout artifacts 13 results / 12 primary kad-nct.24

The later kad-nct.48 rerun split the remaining one-off tail into:

  • kad-nct.61: self-exec CLI option and exit status
  • kad-nct.62: node:test runner behavior
  • kad-nct.63: bootstrap and preload semantics
  • kad-nct.64: test/common helper diagnostics
  • kad-nct.65: --disable-proto delete/throw modes
  • kad-nct.66: dotenv / --env-file / NODE_OPTIONS
  • kad-nct.67: os tmpdir, homedir, priority, and availableParallelism()
  • kad-nct.68: punycode API surface
  • kad-nct.69: source-map API surface
  • kad-nct.70: querystring residuals
  • kad-nct.71: V8-only SharedArray conveyor support boundary
  • kad-nct.72: residual HTTP IncomingMessage / OutgoingMessage semantics

See docs/plans/2026-06-13-node-core-full-suite-kad-nct17.md,
docs/plans/2026-06-14-node-core-semantic-mismatch-triage-kad-nct23.md,
docs/plans/2026-06-14-node-core-timeout-triage-kad-nct24.md, and
docs/plans/2026-06-14-node-core-tail-triage-kad-nct48.md for the exact
commands, artifacts, and triage detail.

Unsupported And Excluded Scope

The full-suite harness discovers all upstream test/parallel/test-*.js files by
default. Exclusions are not made by narrowing selection; they are represented as
explicit manifest SKIP or XFAIL entries only after triage.

Current unsupported categories include:

  • Native addons, Node-API, C++ tests, .node loads, and process.dlopen().
  • V8-only internals, inspector/debugger/profiling hooks, snapshots, coverage,
    V8-specific stack/format details, and experimental V8-only flags such as
    --harmony-struct / SharedArray conveyor behavior.
  • Libuv/native handle internals, exact TTY/pipe handle behavior, and
    host-specific signal/job-control expectations unless a later bead expands the
    supported behavior.
  • External network access, host filesystem assumptions outside the mounted VFS,
    and Python tools/test.py orchestration.
  • Private Node internals such as internal/test/binding unless represented as
    explicit support-boundary skips.

Current Review Note

This PR is not claiming the full Node.js core JavaScript suite is passing. It
adds the harness, records the full-suite attempts, and tracks the remaining
kernel/platform/runtime work with concrete beads. The hard numbers above replace
the obsolete selected 10-test smoke status that was present before the epic scope
correction.

@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown

Phase B-1 matrix build status — pr-693-staging

ABI v15. 66 built, 0 failed, 66 total.

Package Arch Status Sha
libcurl wasm32 built 0dc752cd
libcxx wasm32 built ba88376d
libcxx wasm64 built eef98246
libpng wasm32 built 300aeaae
libxml2 wasm32 built d9edfdfc
libxml2 wasm64 built f33ac92c
openssl wasm32 built 0b87d133
openssl wasm64 built 92a2f35f
sqlite wasm32 built 092822d5
sqlite wasm64 built 93719642
zlib wasm32 built ad546e23
zlib wasm64 built f6c287f7
bc wasm32 built e43a76d5
bzip2 wasm32 built 3f1adcf1
coreutils wasm32 built 0cbae556
curl wasm32 built 4f7327d2
dash wasm32 built 65e39bf3
diffutils wasm32 built 6c59fc70
dinit wasm32 built afe9bac1
fbdoom wasm32 built 19779c73
file wasm32 built 6f22edb6
findutils wasm32 built 62ddd144
gawk wasm32 built 42462259
git wasm32 built 83f4bbe7
grep wasm32 built 2c663f51
gzip wasm32 built 0ee50c18
kandelo-sdk wasm32 built 4629b05b
kernel wasm32 built 12626ee2
less wasm32 built 293fbae1
lsof wasm32 built e8f4435b
m4 wasm32 built fdbfa05c
make wasm32 built 3be6a8d2
mariadb wasm32 built 892b315d
mariadb wasm64 built 7fbc6075
msmtpd wasm32 built f9952440
nano wasm32 built 98c4c429
ncurses wasm32 built 0329c51d
netcat wasm32 built 71425a0e
nginx wasm32 built 5bbf80bc
php wasm32 built 454ac774
posix-utils-lite wasm32 built b39226ea
sed wasm32 built 66417fe9
spidermonkey wasm32 built 0da8b996
tar wasm32 built e5e26250
tcl wasm32 built b48f372a
unzip wasm32 built ae0fbecc
userspace wasm32 built f1ea1901
vim wasm32 built 2415d302
wget wasm32 built d72b84ef
xz wasm32 built 535357d4
zip wasm32 built d3aff965
zstd wasm32 built 5272fa6e
bash wasm32 built a8ab2cc6
mariadb-test wasm32 built 163a4d4f
mariadb-vfs wasm32 built 31398107
mariadb-vfs wasm64 built 596c59a1
nethack wasm32 built 0b797814
node wasm32 built 31a9ced2
spidermonkey-node wasm32 built 2678fd04
vim-browser-bundle wasm32 built dc90bfc0
nethack-browser-bundle wasm32 built 45c13d37
rootfs wasm32 built 2cffd99a
shell wasm32 built 3910288d
lamp wasm32 built 70772eea
node-vfs wasm32 built 83b8330b
wordpress wasm32 built 7b414f4e

Auto-generated; replaced on each push. Raw data in the publish-status workflow artifact.

…81ua' into HEAD

# Conflicts:
#	packages/registry/node-compat/bootstrap.js
#	packages/registry/spidermonkey/test/spidermonkey-node-bootstrap-source.test.ts
Expose buffer.kMaxLength and buffer.constants.MAX_LENGTH from the Node compatibility bootstrap so upstream buffer allocation checks use SpiderMonkey's wasm32 typed-array limit instead of undefined.

Add SpiderMonkey Node compatibility coverage for the kMaxLength overflow allocation assertion and bump the package revision because bootstrap.js is a build input.
# Conflicts:
#	packages/registry/node-compat/bootstrap.js
#	packages/registry/spidermonkey/test/spidermonkey-node-bootstrap-source.test.ts
Preserve existing URL.search percent escapes while encoding raw search characters, and ensure URLSearchParams values are serialized after USVString normalization so unpaired surrogates become U+FFFD.

Add node-compat and SpiderMonkey bootstrap regressions, repair the SpiderMonkey shell patch so it applies cleanly from a fresh source extract, and bump the SpiderMonkey package revision.
…o HEAD

# Conflicts:
#	packages/registry/node-compat/bootstrap.js
#	packages/registry/spidermonkey/build.toml
#	packages/registry/spidermonkey/test/browser/spidermonkey-browser-stress.spec.ts
#	packages/registry/spidermonkey/test/spidermonkey-node-compat.test.ts
…m:Automattic/kandelo into HEAD

# Conflicts:
#	packages/registry/node-compat/bootstrap.js
#	packages/registry/spidermonkey/test/spidermonkey-node-compat.test.ts
…3' into refinery/kad-wisp-dtb

# Conflicts:
#	packages/registry/spidermonkey/build.toml
…5' into refinery/kad-wisp-3xs

# Conflicts:
#	packages/registry/node-compat/bootstrap.js
#	packages/registry/spidermonkey/build.toml
#	scripts/node-core-official-runner.ts
#	tests/package-system/node-core-official-runner.test.ts
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