/** * Scoring for `npm run bench:select-tests`: did `select_tests` name the tests a real change had to * touch? Pure and deterministic; the runner (scripts/bench-select-tests.ts) does the git and index * work. * * Ground truth for one commit: the test files it MODIFIED (not added). A change that edits an * existing test usually had to, because the change broke or changed what that test checks. It is a * proxy: a commit can also edit a test it did not need to, so a miss is a lead to read, not a proven * bug. */ export interface ChangedFile { status: string; path: string; } export interface ReplayCase { commit: string; subject: string; /** Production files the replay applies. */ applied: string[]; /** Test files the commit modified: what select_tests should name. */ truth: string[]; } export interface ReplayScore { commit: string; subject: string; truth: number; hits: number; misses: string[]; selectedFiles: number; /** * Per confidence tier, cumulative (`medium` includes `high`): how many files an agent runs if it * stops at that tier, and how many truth files those include. A file counts at its best tier. */ tiers?: Record; } export type Tier = 'high' | 'medium' | 'low'; /** * The replay case for one commit's `git diff --name-status` lines, or null when it has nothing to * score: no production change under `src/`, or no existing test file modified. */ export declare function replayCase(commit: string, subject: string, nameStatus: string): ReplayCase | null; export declare function scoreReplay(c: ReplayCase, selected: ReadonlyArray): ReplayScore; export interface ReplaySummary { cases: number; truth: number; hits: number; recall: number; meanSelectedFiles: number; /** Per tier, cumulative: recall and mean files when an agent runs only that tier and above. */ tiers?: Record; } export declare function summarize(scores: readonly ReplayScore[]): ReplaySummary; //# sourceMappingURL=select-tests-replay.d.ts.map