Skip to content

fix: close stdin for captured child processes - #73

Merged
calvin-archastro merged 3 commits into
mainfrom
fix/72-captured-stdin-hang
Aug 28, 2026
Merged

fix: close stdin for captured child processes#73
calvin-archastro merged 3 commits into
mainfrom
fix/72-captured-stdin-hang

Conversation

@ark-archastro

Copy link
Copy Markdown
Contributor

What changed

Captured target commands inherited the caller's TTY as stdin while stdout/stderr were piped into Aster's progress UI. Tools that prompt (for example pnpm's modules-purge confirm) then hung with no visible prompt. Closes stdin for captured execution by default. Streaming targets (stream = true, aster <target> --stream) still inherit the terminal.

Fixes #72

Verification

  • cargo fmt --all -- --check
  • cargo clippy --locked --all-targets --all-features -- -D warnings
  • RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps --all-features
  • captured_targets_do_not_hang_on_stdin_prompts (holds Aster's stdin pipe open so an inherited read would hang)
  • constructor and isatty(0) unit tests
  • Full cargo test --locked --all-targets --all-features otherwise passed here except dev_tls (configured_tls_routes_replace_upstream_localhost_open_urls_in_public_plan), which failed because ports 3100/3800/8443 were already bound on this machine.

A captured target whose command is read (or another prompt) should fail or return immediately instead of hanging behind the progress UI. aster <target> --stream should still be interactive.

Checklist

  • Tests cover the behavior change
  • Documentation is updated where needed
  • No secrets, private fixtures, or generated artifacts are included
  • Formatting, clippy, tests, and docs pass locally

Captured targets inherited the caller's TTY as stdin while stdout/stderr
were piped into the progress UI, so tools that prompt (e.g. pnpm's
modules-purge confirm) hung with no visible prompt. Close stdin by
default for captured execution; streaming targets still inherit the
terminal.

Fixes #72
- Docs named `aster run --stream`, which is not a flag on `aster run` — corrected to `aster <target> --stream`, the invocation that actually inherits the terminal.
- Vestigial `null_stdin` bool / `with_null_stdin()` no-op — declined: keeping the documented call site is intentional; collapsing the flag is scope expansion. Constructor tests guard the default.

Reviewers: grok-native, claude-cli, review-principles
@ark-archastro
ark-archastro requested a review from a team August 28, 2026 20:52
The macOS suite failed three supervisor tests on port-bind timeouts while
Ubuntu and the stdin hang tests passed. Those tests already contended for
ephemeral ports when run beside other process tests; run the crate alone
and single-threaded on macOS.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-28T21:42:22.363228Z 2176ae7 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@calvin-archastro
calvin-archastro merged commit eb09f49 into main Aug 28, 2026
11 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.

Interactive prompts from spawned child processes are swallowed; commands hang indefinitely

2 participants