/** * Structural Test-Coverage Gap Report (change: add-test-coverage-gap-report) — * deterministic, graph-derived, no runtime. * * `select_tests` answers the FORWARD question — "I changed X, which tests reach * it?" — by walking the call graph backward from a change to the tests. This is * the exact INVERSE, run once over the whole graph: the set of production * functions in the backward-reachable set of NO test — i.e. no test transitively * reaches them — is the structurally-untested surface. Inverting the same * reachability that powers test selection yields coverage gaps for free, with no * test execution, no coverage instrumentation, and no working runtime. * * SOUNDNESS — gaps only, never "tested". A symbol with no reaching test * definitely has a coverage gap (the falsifiable, sound direction). The report * NEVER makes the unsound inverse claim that a symbol WITH a reaching test is * "tested": structural reachability from a test means a test CAN reach the code, * not that the test ASSERTS its behavior. Ranking reuses the existing * `landmark-signals` hub/chokepoint labels (no composite score, no new tuning * constant), so untested load-bearing code floats to the top. * * Distinct from `find_dead_code`: a gap node with no caller at all is ALSO dead * (find_dead_code's domain) and is labeled as such; an untested entry point or * framework-invoked handler is a real gap and is reported, labeled * untested-not-dead — the two conclusions stay separate. * * Distinct from `get_test_coverage`: that is a spec/domain tag-based report from * the test-generator; this is pure call-graph structural reachability. */ export interface ReportCoverageGapsInput { directory: string; /** Limit reported gaps (default 100, capped 500). */ maxResults?: number; /** Only report gaps whose file path contains this substring (region scope). */ filePattern?: string; /** * Diff scope — restrict the report to gaps the change touches. Explicit symbols * take precedence; otherwise the working tree is diffed against `diffRef` * (default "HEAD" when `diffRef` is the empty string / a diff was requested). * Answers "is the risky part of THIS change untested?". */ changedSymbols?: string[]; diffRef?: string; /** * Restrict test-reachability to directly-resolved edges only, ignoring * synthesized dynamic-dispatch edges (mirrors select_tests/find_dead_code). * Default false — synthesized edges ARE traversed, so a function a test reaches * only through a callback/route is correctly counted as reachable-from-a-test * (and so NOT reported as a gap). Strict mode reports more gaps, more certainly. */ directResolvedOnly?: boolean; } /** * Report the structurally-untested surface: internal code in no test's reachable * set, ranked by significance. Read-only, deterministic, offline. Returns * `unknown` (additive-by-cast), conclusion-shaped (a ranked list + soundness), * never a graph. */ export declare function handleReportCoverageGaps(input: ReportCoverageGapsInput): Promise; //# sourceMappingURL=coverage-gaps.d.ts.map