Goal
Implement Bun-compatible repl, -e/--eval, and -p/--print behavior in Home against the unchanged test/js/bun/repl/repl.test.ts matrix.
This is a focused child of #202 and contributes to #66. It is distinct from closed #91, which covered only Bun.Transpiler REPL-mode corpus behavior.
Current evidence
With Bun source pin 4982b91e3702094330f3be3883354c52b8c01323 and Home 34873c58c, the exact native suite reports 0 pass / 117 fail. Home currently treats repl as a script path (Script not found "repl"), so noninteractive eval/print cases exit 1 and interactive terminal cases time out waiting for a REPL process.
Required behavior includes:
- expression evaluation, persistent bindings,
_and_error .help,.exit,.load,.save,.history,.break,.copy, and.editor- syntax/runtime error recovery
- imports, require, TypeScript, multiline input, and top-level await
-e/--evaland-p/--print, exit codes, event-loop draining, andbeforeExit- terminal line editing, history navigation, completion, Ctrl+C/Ctrl+D, UTF-8 editing, and history permissions
Acceptance criteria
- Run the vendored upstream file unchanged through Home native test execution.
- All 117 tests pass without relaxing the upstream 5-second deadlines.
- Do not replace the file with TODO/skip, alter fixtures, reduce coverage, or shell out to Bun.
- Remove its
rewriteNativeTodoCorpusbranch only after the exact suite is green. - Add focused CLI, terminal, and corpus-gate regression coverage.