Repository navigation
refactor(runtime): split tool invocation pipeline into explicit stages - #1027
Merged
Merged
Conversation
Parse canonical _wc fields directly into invocation metadata and return typed control parse errors. Preserve wire errors, validation precedence, normalization and bounds; v0.4.6 already rejects legacy top-level invocation fields. Replace obsolete wrapper fixtures with envelope contract regressions.
yyjeqhc
force-pushed
the
refactor/tool-invocation-pipeline
branch
from
October 11, 2026 05:06
b05d95e to
c738478
Compare
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
This refactor separates the two largest tool-invocation control paths into explicit stages without changing the public execution contract.
tools/callinto parsing, surface admission, specialized gateway dispatch, runtime execution, and response projection modules._wcenvelope directly into typed invocation metadata instead of rebuilding legacy wrapper fields internally.Review notes
This is intentionally a structural refactor. It does not add a new tool surface, execution authority, retry path, Session inference rule, or durability/replay mechanism.
The review specifically checked that:
_wcinput remains bounded and privacy-safe, with stable error precedence.Validation
cargo fmt --all -- --checkgit diff --check main...HEADbash scripts/workspace_boundary_check.shcargo test --locked --profile dogfood -p webcodex --libI also ran the full library suite with
--features experimental-code-mode. It consistently exposes one existing timing-sensitive peer-collaboration test:tool_runtime::tests::peer_collaboration::ack_required_peer_message_repeats_on_omission_and_current_ack_suppresses_itThe same test passes in isolation, and the exact same full-suite failure was reproduced on the base
maincommitf00e6236b488df3e47ff0d885b31f0760b0aa1d5in a clean detached worktree. It is therefore not introduced by this refactor and was not folded into this PR.No review-fix commit was needed after the structural review.