ReviewOS

home-lang/home

Native CLI: finish package-script execution in the stdio passthrough corpus

#497
Closed chris opened this 9 days ago ·
9 days ago

Follow-up to #66 and #493. The unchanged packages/runtime/test/bun-corpus/js/node/child_process/child_process.test.ts case it accepts stdio passthrough fails in Home. The fixture prepares package scripts using npm-run-all and expects the actual run-p/echo-hello/echo-world command output. Home instead reports Module not found '<temporary fixture directory>/run'. Installed Bun 1.3.14 passes this scenario.

Trace the complete native package-script/CLI child execution path, preserving argv, working directory, inherited stdout/stderr and the fixture's real script execution. Verify the unchanged case and surrounding child-process tests. Do not synthesize its expected text, redirect it through a comparison runtime, or remove the nested script workload.

The complete child-process file currently reports 30 pass / 2 fail / 1 skip / 1 TODO / 70 assertions in Home after the #493 spawn errno patch. Extra stdio pipe rejection is the other failure and is tracked separately. Source pin: 4982b91e3702094330f3be3883354c52b8c01323. No exact root-cause claim yet beyond the observed CLI entry-resolution error.

9 days ago

Cross-reference update: #493 is implemented and verified in 6d797186c, with #66 updated. Package-script passthrough remains unresolved; the native errno fix does not alter CLI script dispatch. The other adjacent gaps are #495 (extra stdio), #496 (real counter snapshots), and #497 (package scripts). These remain separate from the passing full Node timer file (20 tests / 31 assertions).

9 days ago

Implemented and pushed in 06a212514 on codex/runtime-port (not merged to main), authored and committed by Chris Breuer without coauthors.

The original unchanged stdio-passthrough fixture now executes the actual installed npm-run-all/run-p workload and nested package scripts under Home. The complete child-process file reports 32 pass / 0 fail / 1 skip / 1 TODO / 72 assertions on Darwin.

The implementation handles leading --bun run, native package resolution, pre/main/post lifecycle hooks, package cwd/environment, argument escaping including empty arguments, local/PATH binaries, extensionless module precedence, and local bunfig settings. Nested bun aliases resolve to Home, with Node aliases enabled by --bun. Persistent aliases are validated for directory ownership/mode/type and exact symlink targets. System-shell selection uses the original PATH. The internal CLI spawn helper now inherits actual descriptors, drains captured outputs concurrently and propagates real terminating signals, including SIGKILL.

Final verification: 49/49 regression commands, all 23 native regression files, the complete unchanged spawn file (126 pass / 5,484 assertions / 5 skips, retaining its original 1,000-iteration onExit workload), and eight adjacent CLI/bunfig/shell files (48 pass / 106 assertions, one Windows-only skip). The native package test also passes with VM destruction enabled; the previous published binary fails its dispatch control. Build and cached rebuild: 17/17 steps. Scoped Pickier, Zig formatting and whitespace checks pass. Eleven measured CLI/child-process source files are byte-identical to upstream pin 4982b91e3702094330f3be3883354c52b8c01323.

The full 291-case bun-run.test.ts improved from 160 pass / 131 fail to 258 pass / 33 fail / 380 assertions: 98 failures resolved, no newly failing test names. Remaining cases are tracked in #508. Existing native dotenv failures are #506; unsupported internal CLI spawn option variants are #509. Details and local evidence paths are in docs/docs/NATIVE_RUNTIME_BINDINGS.md.

Keeping #497 open for integration and Linux/Windows verification. This is a Darwin checkpoint, not completion of the full Bun port or #66.

9 days ago

Closing as integrated on main. The implementation commit 06a2125 is an ancestor of current main. Fresh Darwin arm64 ReleaseFast verification passes the complete unchanged child-process file at 32 runnable passes / 72 assertions / 0 failures, including the real npm-run-all installation, run-p dispatch, lifecycle scripts, inherited stdio, and nested Home execution. Linux and Windows CLI verification is now tracked explicitly in #678 and broader bun-run platform verification remains #508; whole-suite parity remains #66.

Sign in to comment on this issue.