ReviewOS

home-lang/home

Port Bun internal source-map VLQ hardening and bundler roundtrip

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

Focused child of #66. Activate the byte-identical js/bun/sourcemap/internal-sourcemap-roundtrip.test.ts corpus by porting checked i32 absolute VLQ accumulation, i32::MIN-safe encoding, Bun-compatible --sourcemap=external/--outdir build dispatch, and exact full-VM routing. Acceptance: 14 pass / 0 fail / 1,854 assertions, plus the full home_test gate. Work remains open until the verified commit is pushed.

10 days ago

Completed in cb4b74d.

Ported the Bun internal source-map roundtrip slice with:

  • checked VLQ accumulator updates that reject negative absolute positions and i32 overflow cleanly
  • safe i32::MIN VLQ encoding without a Zig debug trap
  • negative-delta window coverage while absolute positions remain valid
  • Bun-compatible build --sourcemap=external --outdir=... routing through the real bundler, including clean invalid-mode diagnostics
  • exact corpus activation without TODO rewriting

Acceptance evidence:

  • exact internal-sourcemap-roundtrip.test.ts: 14 pass, 0 fail, 1,854 assertions
  • zig build debug --summary failures: pass
  • zig build test -Dfilter=home_test --summary failures: pass

The broader Bun parity goal continues in #66.

Sign in to comment on this issue.