test(mcp): per-mode parity for 6 consolidated tools#139
Merged
Conversation
Adds table-driven tests over every mode of every consolidated tool —
32 mode dispatches total. Each asserts the envelope shape;
payload contents verified for non-emptiness against an in-memory
Kuzu fixture (topology-fixture reuse + Flow engine).
Three known bugs in tools_consolidated.go dispatch are pinned as
explicit INVALID_INPUT assertions (see BUG comments):
- trace_relationships/{callers,consumers,producers,dependencies,
dependents} pass node_id but consumerLikeTool reads target_id
- trace_relationships/shortest_path passes from/to but underlying
tool reads source/target
- find_in_graph/by_endpoint passes node_id but find_related_endpoints
reads identifier
Closes ultraplan §2 mode-by-mode coverage mandate.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4 tasks
3 tasks
aksOps
added a commit
that referenced
this pull request
May 13, 2026
`tools_consolidated.go` was passing arg names to underlying tool
handlers that the handlers didn't unmarshal, producing permanent
INVALID_INPUT envelopes for 7 modes:
- trace_relationships/{callers,consumers,producers,dependencies,dependents}
passed `node_id` to consumerLikeTool handlers that only read
`target_id`.
- trace_relationships/shortest_path passed `from`/`to` but
find_shortest_path reads `source`/`target`.
- find_in_graph/by_endpoint passed `node_id` but
find_related_endpoints reads `identifier`.
Parity test (PR #139) documented but didn't fix these. This patch
corrects the dispatch sites and flips the test expectations from
`CodeInvalidInput` to dispatch-reached-handler shapes.
Co-authored-by: Claude Opus 4.7 <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.
Summary
Bugs documented (not fixed — DO NOT fix in this PR)
Three dispatch parameter mismatches in
tools_consolidated.goare asserted explicitly as INVALID_INPUT:trace_relationships/{callers,consumers,producers,dependencies,dependents}— passesnode_idbutconsumerLikeToolreadstarget_idtrace_relationships/shortest_path— passesfrom/tobutfind_shortest_pathreadssource/targetfind_in_graph/by_endpoint— passesnode_idbutfind_related_endpointsreadsidentifierTest plan
CGO_ENABLED=1 go test ./internal/mcp/... -count=1— 115 passed (38 new)CGO_ENABLED=1 go test ./... -count=1— 866 passed across 45 packages🤖 Generated with Claude Code