ReviewOS

home-lang/home

Exact shell ls corpus: nested install ignores configured timeout

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

Context

While validating the byte-identical pinned Bun shell ls corpus at Bun 4982b91e3702094330f3be3883354c52b8c01323, Home passes every ls assertion except the recursive > node_modules fixture.

The fixture creates a dependency-heavy package.json, runs the current executable as install, then compares recursive listing output. With the absolute Home binary and package-registry access enabled, the nested install remains active until the test runner aborts the test at 5 seconds:

(fail) bunshell ls > recursive > node_modules [5001.11ms]
  ^ this test timed out after 5000ms.

26 pass
1 fail
80 expect() calls

The suite calls setDefaultTimeout(1000 * 60 * 5) in beforeAll, so the reported 5-second timeout may also indicate that the runner is not applying that timeout to this concurrent test.

Reproduction

BUN_ENABLE_EXPERIMENTAL_SHELL_BUILTINS=1 \
  /absolute/path/to/zig-out/bin/home-debug test \
  packages/runtime/upstream/test/js/bun/shell/commands/ls.test.ts

Run with package-registry access. A relative Home binary causes a separate harness-path failure after the fixture changes cwd, so use an absolute path.

Expected

The nested home install completes within the configured 5-minute timeout and the final recursive listing comparison runs.

Actual

The test runner stops the fixture after 5 seconds. The other 26 exact ls tests pass.

  • #66
  • #570
  • shell listing shutdown ownership fix: e0612cfd850718d27e37375af690c1cefc7f541b
9 days ago

The byte-identical pinned Bun rm.test.ts now hits the same dependency-install fixture boundary. Its four non-install tests pass (4 passed, 1 filtered, 45 assertions), including the new ten-iteration symlink-swap TOCTOU regression. The filtered node_modules test runs ${BUN} install --linker hoisted, so this issue now blocks full exact-corpus completion for both ls.test.ts and rm.test.ts.

Related runtime checkpoint: 1611693c74f997e437a2512dd05f45bd2a0c1300.

9 days ago

Resolved across Pantry and Home.

The blocked fixtures had two independent causes:

  1. Pantry rejected Bun's --linker hoisted CLI spelling and installed conventional package.json dependencies twice: once through Pantry's native pipeline and again through the selected JS package manager.
  2. Home captured the 5-second CLI default while collecting tests, so setDefaultTimeout(5 minutes) inside beforeAll could not update inherited test timeouts before execution.

Pantry commit 4d1b539e7 now:

  • accepts and validates --linker isolated|hoisted;
  • applies the override to Pantry's own layout;
  • forwards the mode to delegated Bun installs;
  • delegates ordinary package.json sources once while retaining explicit pantry / system dependencies in Pantry's native pipeline.

Home commit 6999b4dec now resolves inherited timeouts when an execution entry starts, after beforeAll has run. Explicit per-test and per-hook timeouts remain fixed. A focused runtime regression runs the child test command with a 20 ms CLI timeout, raises the inherited default to 250 ms from beforeAll, and confirms an explicit 500 ms timeout is preserved.

Pinned Bun corpus (4982b91e3702094330f3be3883354c52b8c01323) after both fixes:

  • rm.test.ts: 5 passed, 0 failed, 49 assertions; the dependency install / rm -rf node_modules fixture now passes.
  • ls.test.ts: 27 passed, 0 failed, 81 assertions; the recursive node_modules fixture now passes.

Additional verification:

  • Pantry zig build test -j2: exit 0 on the pushed commit.
  • Home runtime regressions: 56 passed, 0 failed.
  • Home native home_rt: 1816 passed, 19 skipped, 0 failed.

Closing this focused boundary. Follow-up parity work remains tracked in #66.

Sign in to comment on this issue.