Problem
The unchanged lifecycle case ensureTempNodeGypScript works fails because the generated temporary node-gyp shim invokes bun, but the lifecycle child PATH cannot resolve the Home executable:
.../.bun-tmp/...node-gyp/node-gyp: line 3: bun: command not found
error: preinstall script from "foo" exited with 127The test deliberately restores the original PATH before spawning and expects the runtime-created shim to remain executable. Adding a test PATH entry would be a workaround and is not acceptable.
Reproduction:
scripts/provision-corpus-deps.sh
HOME_NATIVE_VM=1 HOME_CORPUS_FULL_VM=1 ./zig-out/bin/home test packages/runtime/test/bun-corpus/cli/install/bun-install-lifecycle-scripts.test.tsCurrent unchanged ReleaseFast file: 48 pass / 12 fail / 699 assertions; this is the single node-gyp PATH failure.
Acceptance criteria
- Temporary node-gyp wrappers resolve the active Home runtime using the same self-executable contract as pinned Bun.
- The unchanged lifecycle case passes in Debug and ReleaseFast with its original PATH manipulation.
- Copied/renamed runtime executables continue to use their active binary identity correctly.
- No global
bundependency, PATH injection in tests, wrapper fixture rewrite, or fallback to installed Bun.