Skip to content

phase 5: process dispatcher with stdout capture and stdin modes#4

Merged
macaris64 merged 2 commits intomainfrom
phase-5-process-dispatcher
Apr 18, 2026
Merged

phase 5: process dispatcher with stdout capture and stdin modes#4
macaris64 merged 2 commits intomainfrom
phase-5-process-dispatcher

Conversation

@macaris64
Copy link
Copy Markdown
Owner

Implements FR-01–04, NFR-06, NFR-08:

  • New Dispatcher type wrapping tokio::process::Command
  • DispatchOptions with argv, env_extra, cwd, and StdinMode (Null/Inherit/Piped)
  • DispatchOutput with exit_code, stdout (capped), stderr, stdout_truncated
  • Concurrent stdout/stderr reading via tokio::join! to prevent pipe deadlock
  • Stdin written from an independent tokio::spawn task to prevent deadlock
  • Six fixture binaries under src/bin/fixture_*.rs referenced by CARGO_BIN_EXE_*
  • 15 integration tests covering all FR-01–04 paths and truncation edge cases
  • LogicShell::dispatch wired to real Dispatcher; with_config constructor added
  • All 131 tests pass; fmt + clippy clean

macaris64 and others added 2 commits April 18, 2026 15:11
Implements FR-01–04, NFR-06, NFR-08:
- New `Dispatcher` type wrapping `tokio::process::Command`
- `DispatchOptions` with argv, env_extra, cwd, and `StdinMode` (Null/Inherit/Piped)
- `DispatchOutput` with exit_code, stdout (capped), stderr, stdout_truncated
- Concurrent stdout/stderr reading via `tokio::join!` to prevent pipe deadlock
- Stdin written from an independent `tokio::spawn` task to prevent deadlock
- Six fixture binaries under `src/bin/fixture_*.rs` referenced by CARGO_BIN_EXE_*
- 15 integration tests covering all FR-01–04 paths and truncation edge cases
- `LogicShell::dispatch` wired to real Dispatcher; `with_config` constructor added
- All 131 tests pass; fmt + clippy clean

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fixture binaries (src/bin/fixture_*.rs) are spawned as child processes
during integration tests; tarpaulin cannot instrument them, so they
counted as 0/26 covered lines, pulling overall coverage to 89.18%.

Adding "*/bin/fixture_*.rs" to tarpaulin exclude-files restores coverage
to ~95% (371/390 instrumented lines). Also adds a Unix-only unit test for
the signal-kill exit-code path (status.code() == None → -1), covering the
previously untested unwrap_or(-1) fallback in Dispatcher::dispatch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@macaris64 macaris64 merged commit ddedc43 into main Apr 18, 2026
4 checks passed
@macaris64 macaris64 deleted the phase-5-process-dispatcher branch April 18, 2026 21:34
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