Problem
The complete unchanged upstream js/node/http2/node-http2.test.js never reaches its first test in Home. The pinned Bun control runs it fully.
| runtime | result |
|---|---|
Home (zig build debug -Denable_jsc=true, source pin 4982b91e3702094330f3be3883354c52b8c01323) | 0 pass / 1 fail / 1 error |
Bun 1.4.0-canary.1+4982b91e3 (built from the same pin) | 287 pass / 6 skip / 0 fail / 12,192 assertions |
Home aborts while loading the file's dependencies:
TypeError: require() async module ".../packages/runtime/test/bun-corpus/harness.ts" is unsupported. use "await import()" instead.
at <anonymous> (.../js/node/http2/http2-helpers.cjs:3:7)harness.ts has no top-level await. The load shape is: the ESM test statically imports "harness" and "./http2-helpers", and that CommonJS helper then calls require("harness") on the module the ESM graph has already linked. Home classifies that record as an async module and refuses the synchronous require; Bun resolves it.
Reproduction
HOME_NATIVE_VM=1 HOME_CORPUS_FULL_VM=1 ./zig-out/bin/home-debug test \
packages/runtime/test/bun-corpus/js/node/http2/node-http2.test.jsControl: ~/Code/bun/build/release/bun test <same path>.
What is NOT the mechanism
Three narrower shapes all behave identically in Home and Bun, so none of them isolates it:
require()of a plain.tsESM module from a.cjs, by relative path — passes in both.- The same through the corpus's tsconfig
pathsalias (require("harness")from a.cjsat the corpus root) — passes in both. - An ESM entry that imports a module and a
.cjsthat requires that same module — fails in Bun too, so Home's rejection there is correct behaviour, not the gap.
Something about the real file's graph makes Bun's loader treat the record as synchronously requirable where the reduced case does not. That difference is the thing to find; the reduction above is recorded so the next person does not repeat it.
Acceptance criteria
- The complete unchanged
js/node/http2/node-http2.test.jsreaches and runs its tests, matching the pinned Bun control. - No corpus file, fixture, or helper is edited, and no assertion, workload, deadline, or skip is added.
- The fix is the pinned loader's actual rule for when a linked record may be
required, not a special case for this file, this helper, orharness.ts. - Adjacent
js/node/http2files stay green: the directory is currently 4 pass / 1 fail / 1 crash / 0 hang, with this file the crash andh2-conformance.test.tsthe separate failure.
Parent parity tracker: #66