Skip to content

test runtime: the source control generation pipe-close test runs on Node (orca #48, slice 9) - #59

Merged
nachumi-a2zoperations merged 1 commit into
blowzer/fork-onlyfrom
nachumi-a2zoperations/issue-48-wsl-prompt-pipe
Nov 16, 2026
Merged

nachumi-a2zoperations merged 1 commit into
blowzer/fork-onlyfrom
nachumi-a2zoperations/issue-48-wsl-prompt-pipe

Conversation

@nachumi-a2zoperations

Copy link
Copy Markdown

Refs #48 (slice 9: source-control-wsl-prompt.test.ts, 1 red test on Bun). #48 stays open for the rest.

Root cause

The test "runs the production attempt through real private shell preparation and pipe-close" starts a child that closes its own stdin (exec 0<&-). The production code then writes the prompt into that pipe, and the test proves it exercised the pipe-close path by seeing the stdin stream emit error with EPIPE.

Probe outside Orca (MacBook) Writing into a child's stdin after the child closed it
Node write() returns false, then error with code = EPIPE
bun 1.4.4 write() returns false, no error event at all

The product is not affected, on any runtime it uses

  • It does not rely on that error event. The prompt producer waits for the stream's close, and the runner for the child's close/exit. Under Bun, the product's own assertions in this test passed (result not successful, the private directory removed once). Only the test's EPIPE observation failed.
  • This code runs only in Electron main (Node). Neither the daemon nor the orcad server bundles text generation, and orcad slots now run a pinned Node. Bun survives only as a "Bun-era" slot marker in orcad-artifacts.ts.

Fix

Route this test to the Node runtime in vitest-node-runtime-files.mjs. Product code is unchanged.

  • The entry sits mid-list, and the routing check is its own small test file, so this PR touches none of the lines PR 58 adds. git merge-tree against PR 58's head is clean.

Tests

  • vitest-node-runtime-pipe-errors.test.mjs: red first, green now.
  • It + source-control-wsl-prompt.test.ts through the normal runner: 43/43 (1 was red).
  • Preflight check-changed: 13/13.

…ode (orca #48, slice 9)

Root cause of source-control-wsl-prompt.test.ts ("runs the production
attempt through real private shell preparation and pipe-close") failing
on Bun only: the fixture child closes its stdin (exec 0<&-), the
production code writes the prompt into that pipe, and the test proves
it exercised the pipe-close path by seeing the stdin stream emit
'error' with EPIPE. Probed outside Orca (bun 1.4.4 vs Node): Node's
stream emits EPIPE; Bun's write() returns false and emits no error.

The product is not affected, on any runtime it uses:
- it does not depend on that error event: the prompt producer waits
  for the stream's 'close', and the runner for the child's
  close/exit. Under Bun its own assertions in this test passed
  (result not successful, the private directory removed once); only
  the test's EPIPE observation failed;
- this code runs only in Electron main (Node). The daemon and the
  orcad server do not bundle text generation, and orcad slots now run
  a pinned Node (Bun survives only as a "Bun-era" slot marker).

Fix: route this test to the Node runtime (vitest-node-runtime-files
.mjs, placed mid-list so it does not touch the lines PR 58 adds). The
routing check is its own small test file for the same reason. No
product code changes.

Tests: vitest-node-runtime-pipe-errors.test.mjs, red first, green now;
it + source-control-wsl-prompt through the normal runner: 43/43 (1 was
red).

Refs #48
@nachumi-a2zoperations
nachumi-a2zoperations merged commit 9830b80 into blowzer/fork-only Nov 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant