ReviewOS

home-lang/home

test: route Bun corpus directory targets through Home runner

#71
Closed chris opened this 10 days ago ·
10 days ago

Problem

The Home test command recognizes individual files under packages/runtime/test/bun-corpus and runs them through the Home corpus adapter, but a directory target currently falls through to native Bun.

For example:

./zig-out/bin/home test packages/runtime/test/bun-corpus/cli/install

prints native bun test v1.3.14 output and reports 73 file-level errors. Most fail because Home-provided exports such as heapStats from bun:jsc are absent; the hosted-git-info files similarly miss hostedGitInfo from bun:internal-for-testing. Individual files such as bun-install.test.ts, bun-install-registry.test.ts, and bun-link.test.ts pass through the Home native corpus path.

This blocks authoritative directory- and suite-level proof for the Bun port tracked in #66.

Expected behavior

  • Recognize Bun corpus directory targets and enumerate their supported test files through the Home corpus runner.
  • Aggregate pass/fail/unsupported/todo counts consistently with single-file native corpus execution.
  • Preserve deterministic file ordering and useful first-failure reporting.
  • Never silently fall through to native Bun for a recognized Bun corpus directory.
  • Add a regression covering at least one nested corpus directory and parity with its individual-file results.

Current evidence

  • ./zig-out/bin/home test packages/runtime/test/bun-corpus/cli/install/bun-link.test.ts: 4 passed, 0 failed.
  • The containing cli/install directory target falls through to native Bun and reports 73 errors before executing Home corpus semantics.

Parent tracking: #66.

10 days ago

Landed in 0de37debbdd82a8a0b261b4bf1f2428bc9c9a5bb (feat(test): route bun corpus directories natively).

What changed:

  • Recognized relative and absolute descendants of packages/runtime/test/bun-corpus as first-class directory targets.
  • Added deterministic recursive test-file collection through the Home corpus runner.
  • Preserved corpus-root-relative paths so every file receives the same rewrite/fixture selection as an individual-file run.
  • Aggregated file/pass/fail/unsupported/todo counts and retained the first sorted failure and message.
  • Directory targets with subset flags now fail explicitly instead of falling through.
  • Native-directory output explicitly rejects delegated bun test as parity evidence.

Regression:

  • js/bun/json5 selects the two existing individual corpus files in sorted order.
  • Individual pinned counts are 320 and 113; the directory reports 2 files / 433 passed / 0 failed / 0 unsupported / 0 todo.
  • Both relative and absolute directory paths pass through Bun Corpus Native Directory.

Validation:

  • Clean-cache full home_test: 1,051 passed / 1 intentional skip / 0 failed (1,052 total).
  • ./pantry/.bin/zig build --summary failures: passed.
  • Scoped Pickier, Zig formatting, and git diff --check: passed.

All acceptance criteria are satisfied.

Sign in to comment on this issue.