tidy-gateway: a description is not an input to executing a call - #246
Merged
Conversation
callTarget carried a description field, filled at both construction sites — the host-provider path from rt.Def, the routed path from a loop over srv.Tools() — and read by nothing. A field on the execution target reads as something execution depends on, and here it says the opposite of what is true: a description decides what an agent CHOOSES to call, which is a discovery-layer question, and this struct is what runs after the choice is made. Found by sweeping the tree for struct fields that are written and never read. CallRequest.InputSchema is the other hit in this file and stays: its comment records an explicit decision to keep it populated so that deleting it is deliberate rather than a side effect. Nothing recorded any such intent for description. make ci green. Co-Authored-By: Claude Opus 5 (1M context) <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.
Nightly tidy. The intended slice —
internal/catalog+internal/ratelimit+internal/shaping— came up empty (no dead functions, no duplicated blocks). A new lens over the whole tree found one thing.gateway: dropcallTarget.description, a field written at both construction sites and read by nothingAlso verified this round (all held):
canonical.md§1 frozen identifiers, every row against the code: module path, both binary names,AgentHub/AgentHubDevin bothinternal/platformandapi, theAGENTHUB_*prefix,<run>/ctl.sockand the Windows\\.\pipe\agenthub-ctl-<sha8(SID)>form,main.channeldefaulting todev.go list -deps:internal/mcphas zero dependencies (stdlib only);internal/mcp/transportdepends only oninternal/mcp;internal/tier,internal/platform,internal/logxare true leaves;guard/netguardandguard/spawnguardreach only their own parent.