Skip to content

tidy-gateway: a description is not an input to executing a call - #246

Merged
dinstein merged 1 commit into
mainfrom
tidy-catalog
Aug 7, 2026
Merged

tidy-gateway: a description is not an input to executing a call#246
dinstein merged 1 commit into
mainfrom
tidy-catalog

Conversation

@dinstein

@dinstein dinstein commented Aug 7, 2026

Copy link
Copy Markdown
Owner

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.

  • 1. gateway: drop callTarget.description, a field written at both construction sites and read by nothing

Also verified this round (all held):

  • canonical.md §1 frozen identifiers, every row against the code: module path, both binary names, AgentHub/AgentHubDev in both internal/platform and api, the AGENTHUB_* prefix, <run>/ctl.sock and the Windows \\.\pipe\agenthub-ctl-<sha8(SID)> form, main.channel defaulting to dev.
  • The four hard constraints, resolved with go list -deps: internal/mcp has zero dependencies (stdlib only); internal/mcp/transport depends only on internal/mcp; internal/tier, internal/platform, internal/logx are true leaves; guard/netguard and guard/spawnguard reach only their own parent.

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>
@dinstein
dinstein merged commit 61c9655 into main Aug 7, 2026
3 checks passed
@dinstein
dinstein deleted the tidy-catalog branch August 7, 2026 14:04
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