/** * Ruling an issue's acceptance criteria against freshly captured evidence. * * Only `verify-fix` calls this, and nothing else writes a verdict: the boxes on * the card are lookout's, and the UI has no endpoint that could change one. * * Each source is ruled by the thing that can actually decide it. A derived * criterion is the deterministic check restated, so the check itself rules it. * The universal one is the pixels-moved guard, which is a hash comparison. Only * the judge-authored ones need a model, and they get an independent pass over * the fresh screenshots rather than being inferred from whether the original * finding came back: two ways of being wrong are better than one way twice. */ import type { AcceptanceCriterion } from "./acceptance.js"; export interface DeterministicOutcome { /** Fingerprints of deterministic findings in the fresh evidence. */ freshFingerprints: ReadonlySet; /** Fingerprints whose shot was re-captured at all this run. */ recapturedFingerprints: ReadonlySet; } export interface JudgedCriterion { verdict: "pass" | "fail" | "not-verifiable"; reasoning: string; /** The shots the verifier says decided it. */ evidence?: string[]; /** The verifier's one-line remedy, when it offered one. */ suggestion?: string; } export interface RuleAcceptanceInput { criteria: AcceptanceCriterion[]; changedShots: number; totalShots: number; /** * Shots in scope that had a previous hash to compare against. Zero means the * pixels-moved question cannot be asked at all (a cleaned evidence directory, * a route never captured before), which is `not-verifiable` rather than the * claim of sameness this used to make. */ baselineShots: number; deterministic: DeterministicOutcome; /** Verdicts for the judge-authored criteria, by criterion id. */ judged: Map; ruledAt: string; runId: string; } /** A new list with every criterion ruled; the input is not mutated. */ export declare function ruleAcceptance(input: RuleAcceptanceInput): AcceptanceCriterion[]; /** The criteria a model has to look at, numbered the way the verifier numbers them. */ export declare function judgeableCriteria(criteria: AcceptanceCriterion[]): AcceptanceCriterion[]; export declare function asCriteriaText(criteria: AcceptanceCriterion[]): string; /** * Map the verifier's numbered results back onto the criteria they were made * about. The verifier re-extracts criteria from the text it is given, so the * numbering usually survives; when it does not, the text is matched instead, * and anything still unmatched is simply left unruled. */ export declare function matchJudged(criteria: AcceptanceCriterion[], results: { id: number; text: string; verdict: string; reasoning: string; evidence?: string[]; suggestion?: string; }[]): Map;