Skip to content

fix(mcp): correct dispatch arg names in 7 consolidated modes#149

Merged
aksOps merged 1 commit into
mainfrom
fix/mcp-consolidated-dispatch-args
May 13, 2026
Merged

fix(mcp): correct dispatch arg names in 7 consolidated modes#149
aksOps merged 1 commit into
mainfrom
fix/mcp-consolidated-dispatch-args

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented May 13, 2026

Summary

tools_consolidated.go delegate() calls were passing arg names that the underlying tool handlers don't unmarshal, producing permanent INVALID_INPUT envelopes for 7 modes:

  • trace_relationships/{callers,consumers,producers,dependencies,dependents} — passed node_id but handlers read target_id
  • trace_relationships/shortest_path — passed from/to but handler reads source/target
  • find_in_graph/by_endpoint — passed node_id but find_related_endpoints reads identifier

The parity test landed in #139 documented but did not fix these. This patch corrects the dispatch sites and flips the test expectations from CodeInvalidInput to dispatch-reached-handler shapes.

Test plan

  • cd go && CGO_ENABLED=1 go test ./internal/mcp/... -count=1 — 116 passed
  • Parity test TestTraceRelationships_AllModes now exercises the real handler paths
  • Parity test TestFindInGraph_AllModes by_endpoint mode now reaches the handler

🤖 Generated with Claude Code

`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>
@aksOps aksOps merged commit 91e34c3 into main May 13, 2026
13 checks passed
@aksOps aksOps deleted the fix/mcp-consolidated-dispatch-args branch May 13, 2026 15:19
aksOps added a commit that referenced this pull request May 14, 2026
Stale doc references after Phase 6 (Java deletion, #132) and the Kuzu
0.7.1 → 0.11.3 bump (#155 + #159).

- CLAUDE.md / PROJECT_SUMMARY.md: bump Kuzu 0.7.1 → 0.11.3,
  go-sqlite3 1.14.22 → 1.14.44, cobra to 1.10.2; note native FTS.
- AGENTS.md: rewrite "What this repo is" (no more "REST API");
  flip `mvn -B -ntp clean verify` → `go test ./...`; clarify that
  REST + React SPA were deleted in Phase 6 and won't return.
- SECURITY.md: rewrite scope. Drop the dead JAR / serve / REST API /
  React UI / H2 / Neo4j Embedded references. New in-scope list covers
  every codeiq subcommand, the 10 MCP tools (with `run_cypher` mutation
  gate called out), `.codeiq/cache/` (SQLite) + `.codeiq/graph/`
  (Kuzu), and `read_file` path sandboxing. Add the security CI
  workflows (CodeQL, Semgrep, OSV-Scanner, Trivy, Gitleaks, SBOM,
  Socket Security) + perf-gate to the hardening references.
- CHANGELOG.md: populate [Unreleased] with the OOM-fix saga
  (PRs #145-#148), the five correctness fixes (#149-#153), the
  Kuzu 0.7.1 → 0.11.3 bump (#155-#158), the FTS migration (#159),
  the Dependabot config rewrite (#154), and the enrich CLI knobs.

No code changes.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
@aksOps aksOps mentioned this pull request May 14, 2026
4 tasks
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