Repository navigation
refactor(tool-runtime): consolidate empty execution stream projection - #1246
Merged
Merged
Conversation
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.
Four execution projection paths independently maintained the same rules for omitting empty stdout/stderr tails, zero line counts and false truncation flags. A private
sparsify_empty_execution_streamsfunction now owns those exact rules for terminal validation, pending validation, structured execution and shell success.The caller-specific terminal proofs, pending checks, failure handling, recovery metadata and ordering remain in place. Null/malformed values, nonempty output and output-loss evidence are preserved. There are no schema, authority, persistence, continuation or tool-surface changes, additional allocations, generics or dispatch abstractions.
This is deliberately a small structural cleanup: 35 production Rust lines removed, with four independently maintained implementations reduced to one. Its benefit is preventing stream-projection drift; it does not attempt to unify semantically different execution responses.
Counts use exact PR merge base
bc63e43505f0162153950bc9ee43c3f6458b4294, physical source lines including blanks/comments, and all tracked.rsfiles. Test separation includes 145,402 lines in dedicated test files plus an estimated 19,230 lines in explicitcfg(test)/cfg(all(test, ...))item spans. Partition counts are estimates; totals and deltas are exact. This branch is independent of #1245 and edits a different file.Validation:
cargo test --locked -p webcodex --lib tool_runtime::result_projection: 25 passed, 0 failed, 0 ignored, covering execution/pending/failure projections, shell exceptional-state preservation and validation output schemas.cargo fmt --all -- --checkandgit diff --check: passed.Risk is limited to the final model projection; canonical evidence recording and execution are untouched. Windows/Linux and optional feature configurations were not run locally. No deployment, release, service restart or merge is included.