ReviewOS

home-lang/home

Port Bun.Transpiler truncated UTF-8 guard-page regression

#130
Closed chris opened this 11 days ago ·
11 days ago

Scope

Activate Bun’s byte-identical js/bun/transpiler/transpiler-truncated-utf8.test.ts and its byte-identical FFI fixture. The fixture maps two pages with native mmap, marks the second PROT_NONE, places ten truncated UTF-8/comment inputs directly against the guard page, and calls the real Bun.Transpiler.transformSync implementation.

Baseline

  • exact corpus: 0 passed, 0 failed, 0 unsupported, 1 native todo
  • parent test and fixture both match ~/Code/bun byte-for-byte
  • direct Home native probe already completes all ten guard-page cases and prints DONE

Acceptance criteria

  • execute the unchanged parent corpus through Home’s real child-process, bun:ffi, mmap/mprotect, and native Transpiler paths
  • preserve the original OS guard and all ten cases; no reduced inputs, fabricated output, or bypass of the guard page
  • assert clean stdout/stderr, exit code 0, no signal, and all upstream labels
  • add a permanent regression to home_test
  • exact corpus passes with 1 test, 0 failures, 0 unsupported, 0 todo
  • full home_test gate passes
  • commit/push as Chris Breuer without coauthors and update #66
11 days ago

Implemented and pushed in ab14f89 (test: port Bun truncated UTF-8 guard regression).

What landed:

  • activated the byte-identical upstream js/bun/transpiler/transpiler-truncated-utf8.test.ts
  • kept the byte-identical FFI fixture unchanged, including native mmap, mprotect(..., PROT_NONE), all ten truncated UTF-8/comment cases, and real Bun.Transpiler.transformSync calls
  • added the missing upstream-compatible libcPathForDlopen() harness mapping (libc.so.6 on glibc Linux, libc.dylib on macOS)
  • executes the fixture through Home’s real child-process and bun:ffi paths; no output fabrication, reduced inputs, or guard-page bypass
  • added a permanent regression that requires the native-todo wrapper to stay absent, the guard-page mechanics/cases to remain present, and the upstream parent test to pass

Validation:

  • parent and fixture both verified byte-identical with ~/Code/bun
  • ./pantry/.bin/zig build debug --summary failures — pass
  • exact corpus — 1 passed, 0 failed, 0 unsupported, 0 todo
  • ./pantry/.bin/zig build test -Dfilter=home_test --summary failures — pass

Closing as complete. Tracking continues in #66.

Sign in to comment on this issue.