tests/runtime/native-napi-bootstrap-safety.test.mjs fails consistently:
open: ENOENT
while reading config "<tmp>/packages/runtime/test/bunfig.toml"
...
reason: no-tests-observedThe assertion that trips is assert.match(reduced.output, /tests unsupported: 1/) — the corpus process exits 1 before running anything.
Why
The test builds a synthetic tree (native-napi-bootstrap-safety.test.mjs:57-59):
const corpus = join(directory, 'packages/runtime/test/test')
mkdirSync(corpus, { recursive: true })It creates packages/runtime/test/test/ and a fixture, and never creates packages/runtime/test/bunfig.toml. The runner then resolves a config at that path and fails.
Arguments.loadBunfig (packages/runtime/src/runtime/cli/Arguments.zig:290-301) tolerates a missing file only when the path was auto-discovered:
.err => |err| {
if (auto_loaded) return;
Output.prettyErrorln("{f}\nwhile reading config \"{s}\"", .{ err, config_path });
Global.exit(1);
},So something on the corpus-runner path is supplying this as an explicit config rather than an auto-discovered one. That is the bug: a synthetic corpus tree has no reason to carry a bunfig, and Bun's own auto-discovery would skip it.
Likely related to 65f306518 ("fix(test): restore Bun checkout topology"), which introduced packages/runtime/test/bunfig.toml and set root = "test".
What it is NOT
Not caused by 98984a8cd (request-target normalization) — verified by stashing that change, rebuilding, and re-running: it fails identically without it. All three tracked bunfig files (bunfig.toml, packages/runtime/test/bunfig.toml, packages/runtime/test/test/bunfig.toml) are present and unmodified in the working tree.
I could not identify what flipped it. It passed in a runtime-regression.sh run earlier the same session on the same committed source (68 ok / 1 failed), and fails now (67 ok / 2 failed) on that same source, so the trigger appears to be environmental rather than a code change. Recording it rather than leaving it unexplained.
Suggested fix
Either have the corpus runner treat its bunfig as auto-discovered (so absence is tolerated), or have the test create the file its synthetic tree now requires. The former matches Bun.
Refs #66