/** * Deterministic Test Impact Selection (spec-19) — static, call-graph-based * regression test selection (RTS) served to the agent at edit time. * * "I changed parseConfig() — which tests should I run?" is answered by walking the * call graph *backward* from the change to every test that transitively reaches it. * grep can't (the reach is through indirect calls); the model is slow and guesses; * a deterministic graph does it instantly over edges we already store (`calls`, * `tested_by`, inheritance). * * Soundness is stated honestly: this is an OVER-APPROXIMATE PRIORITIZER, not a * sound replacement for the full suite. Direct/static dispatch is safely * over-approximated; dynamic dispatch, reflection, and DI can under-select. */ import type { SerializedCallGraph, FunctionNode } from '../../analyzer/call-graph.js'; export interface SelectTestsInput { directory: string; /** Explicit changed symbols (function/method names). */ changedSymbols?: string[]; /** Git ref to diff the working tree against (e.g. "HEAD", "main"). */ diffRef?: string; /** Max backward-reachability depth (default 12, capped). */ maxDepth?: number; /** * Restrict backward reachability to directly-resolved edges only, ignoring * synthesized dynamic-dispatch edges (spec: add-synthesized-dynamic-dispatch-edges). * Default false (synthesized edges are traversed, so tests reaching changed code * only through a callback/event/route are still selected). */ directResolvedOnly?: boolean; /** * Opt in to federation scope: also select tests in consumer repos that reach a * call site of a changed published symbol. (change: add-multi-repo-federation) */ federation?: boolean; /** Restrict the federation scope to these registry repo names (default: all). */ federationRepos?: string[]; } /** Resolve changed symbols → seed production nodes (exact name preferred). */ export declare function seedsFromSymbols(cg: SerializedCallGraph, symbols: string[]): FunctionNode[]; /** Resolve changed files (from a diff) → seed production nodes. */ export declare function seedsFromFiles(cg: SerializedCallGraph, files: string[]): FunctionNode[]; /** * Select the tests that transitively reach a set of changed symbols/files. * Read-only, deterministic, offline. Returns `unknown` (additive-by-cast). */ export declare function handleSelectTests(input: SelectTestsInput): Promise; //# sourceMappingURL=test-impact.d.ts.map