ReviewOS

home-lang/home

Port Bun JSC and SIMD native corpus matrices

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

Scope

Activate the three byte-identical Bun JSC corpus files currently hidden behind native TODO rewrites:

  • js/bun/jsc/bun-jsc.test.ts
  • js/bun/jsc-stress/jsc-stress.test.ts
  • js/bun/jsc-stress/fixtures/simd-baseline.test.ts

Verified evidence

  • bun-jsc.test.ts: 31 pass / 0 fail
  • jsc-stress.test.ts: 83 pass / 0 fail
  • simd-baseline.test.ts: 28 pass / 0 fail

The initial sandboxed SIMD run produced one failure because the restricted runner denied the loopback bind with EPERM. Home incorrectly flattened that concrete OS failure to EADDRINUSE; with local networking permitted, ephemeral port selection already worked correctly.

Acceptance

  • Preserve the concrete OS error at the runtime listen boundary using Home's native sys.Error / SystemError bridge.
  • Keep useful, catchable listen diagnostics, structured fields, and source stacks.
  • Confirm permitted Bun.serve({ port: 0 }) binds an ephemeral port.
  • Remove all three stale corpus TODO rewrites.
  • Exact native runs pass with upstream-declared skips/todos only.
  • Debug build and full home_test gate pass.
  • Land on main with a conventional commit and reference the result from #66.
10 days ago

Landed on main in 9028ed5ff.

Completed:

  • removed the native TODO rewrites for all three byte-identical upstream files;
  • preserved the listen errno before logging/TLS work can overwrite it;
  • routed TCP and Unix listen failures through Home's sys.Error / SystemError bridge;
  • retained structured code, errno, syscall, address, port/path, and the source stack;
  • kept the defensive EADDRINUSE fallback only when the native layer provides no errno.

Verification:

  • bun-jsc.test.ts: 31 pass / 0 fail
  • jsc-stress.test.ts: 83 pass / 0 fail
  • simd-baseline.test.ts: 28 pass / 0 fail
  • restricted bind probe: concrete EPERM plus source stack and structured fields
  • permitted Bun.serve({ port: 0 }): successful ephemeral bind
  • debug build: pass
  • full home_test gate: pass
  • all three corpus files match ~/Code/bun byte-for-byte

The original single SIMD failure was a restricted-runner bind denial, not broken ephemeral-port selection. This slice fixes the masking that made that denial look like EADDRINUSE.

Sign in to comment on this issue.