test: add E2E tests for engine stdio piping#52
Merged
anandgupta42 merged 2 commits intomainfrom Mar 5, 2026
Merged
Conversation
Verify that all execFileSync calls in engine.ts use { stdio: "pipe" }
to prevent subprocess output (uv, pip install, python --version, etc.)
from leaking into the TUI's text input area.
Tests use real subprocess calls via spawnSync to confirm the piping
behavior end-to-end, plus a source-level check that every call site
in engine.ts includes the stdio option.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment on lines
+125
to
+127
| for (const site of callSites) { | ||
| expect(site.text).toContain('stdio: "pipe"') | ||
| } |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Without this option, subprocess output from uv, pip install, tar, and python/uv --version leaks into the TUI's text input area. Piping stdio suppresses this noise while still capturing the return value. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
anandgupta42
added a commit
that referenced
this pull request
Mar 17, 2026
* test: add E2E tests for engine.ts stdio piping
Verify that all execFileSync calls in engine.ts use { stdio: "pipe" }
to prevent subprocess output (uv, pip install, python --version, etc.)
from leaking into the TUI's text input area.
Tests use real subprocess calls via spawnSync to confirm the piping
behavior end-to-end, plus a source-level check that every call site
in engine.ts includes the stdio option.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: add stdio: "pipe" to all execFileSync calls in engine.ts
Without this option, subprocess output from uv, pip install, tar, and
python/uv --version leaks into the TUI's text input area. Piping stdio
suppresses this noise while still capturing the return value.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
execFileSynccalls inengine.tsuse{ stdio: "pipe" }to prevent subprocess output from leaking into the TUIecho,python3 --version,tar --version) and assert captured stdout/stderr is cleanstdio: "pipe", and a source-level check that all 6 call sites inengine.tshave the option setTest plan
bun test test/bridge/engine.test.ts— 6 tests passbun test test/bridge/— all 13 tests pass (no interference with existingclient.test.ts)🤖 Generated with Claude Code