gograph_coverage
Map a Go test function to all production symbols it statically reaches, with exact vs. possible paths. Resolve ambiguous test matches and filter to exact-only edges for precise attribution, aiding structural code analysis.
Instructions
Return the transitive set of production functions and methods statically reachable from one test function. The MCP server refreshes the graph first. Exact results have an all-static path; any parser-only or CHA dispatch edge degrades that symbol and its descendants to possible. Same-named tests in multiple packages return status=ambiguous and are never merged; retry with the stable test ID from matched_tests or gograph_identity. The optional package qualifier resolves the uncommon in-package versus external foo_test ID collision. Set exact_only=true to omit possible results. This is static attribution, not runtime or branch coverage proof. Read-only; no side effects. WHEN TO USE: To map one test to the product symbols it structurally exercises. NOT TO USE: To claim execution or branch coverage. RETURNS: gograph.coverage.v1 JSON with analysis precision, test-call resolution, matched tests, symbols, resolution, depth, representative stable-ID paths, and limitations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| test | Yes | Exact test name or canonical stable test symbol ID | |
| package | No | Optional exact Go package name used only to disambiguate matching test symbols | |
| exact_only | No | Return only symbols reached entirely through exact/static edges |