phase 5: process dispatcher with stdout capture and stdin modes#4
Merged
phase 5: process dispatcher with stdout capture and stdin modes#4
Conversation
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>
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.
Implements FR-01–04, NFR-06, NFR-08:
Dispatchertype wrappingtokio::process::CommandDispatchOptionswith argv, env_extra, cwd, andStdinMode(Null/Inherit/Piped)DispatchOutputwith exit_code, stdout (capped), stderr, stdout_truncatedtokio::join!to prevent pipe deadlocktokio::spawntask to prevent deadlocksrc/bin/fixture_*.rsreferenced by CARGO_BIN_EXE_*LogicShell::dispatchwired to real Dispatcher;with_configconstructor added