import type { PixelDiff } from "./pixels.js"; import type { SheetResult } from "../capture/sheet.js"; import { aiToFindings, deterministicToFindings, type Backlog, type BacklogFinding } from "../backlog/lib.js"; import { inheritedByDesign } from "../backlog/adjudicate.js"; import { type FixCluster } from "../fix/cluster.js"; import type { CheckOutcome } from "../check/outcome.js"; import type { ResolvedConfig, ShotRecord } from "../types.js"; import type { Parsed } from "../util.js"; /** * A finding as it comes back from a re-capture: the judge's and the * deterministic channel's shapes, before either has a status or a history. */ export type FreshFinding = ReturnType[number] | ReturnType[number]; export interface FreshEvidence { resolved: ResolvedConfig; outcome: CheckOutcome; shotsById: Map; backlog: Backlog; /** The labelled composite of what was just re-captured. */ sheet: SheetResult | null; /** Shots whose pixels moved since the previous run. */ changedShots: Set; /** How many shots had a baseline to compare against at all. */ baselineShots: number; /** * How much each changed shot moved, for the shots whose baseline pixels were * still on hand. A changed shot missing from this map moved by an amount * nothing could measure, which the ruling says rather than guesses at. */ changes: Map; freshDeterministic: ReturnType; /** This cluster's findings that came back, minus anything ruled by-design. */ stillOpen: FreshFinding[]; runIdNow: string; } export declare function gatherFreshEvidence(args: { parsed: Parsed; issueId: string; cluster: FixCluster; priorHashes: Map; /** Where the baseline's pixels are, so how much moved can be measured. */ priorPixels?: ReadonlyMap; /** The target's configured routes, in config order: the shell scope's top-up. */ configuredRoutes?: string[]; }): Promise; /** * Every shot lookout holds a previous hash for, from either source. * * The capture workspace, inside the project's `.lookout/`, is working state * one capture rebuilds, and an empty baseline made every fresh shot look * changed, which switched the pixels-moved guard OFF exactly when it was * needed: a wiped capture workspace would let judge variance alone pass an * issue. backlog.json is committed and its evidence refs carry the hash each * finding was filed against, so they outlive the pixels. The report is * fresher, so it wins where both know a shot. */ export declare function baselineHashes(priorShots: readonly { id: string; hash: string; }[], findings: readonly BacklogFinding[]): Map; /** * Drop findings somebody already ruled intentional. * * A by-design sibling under an issue's own cluster key re-fires on every * capture, because an intentional defect is still there by definition. Counting * it held the issue open however well the real defect had been fixed, and then * blocked it with a reason claiming a defect persists that somebody had already * ruled intended. `mergeFindings` suppresses these; the verdict has to as well. */ export declare function withoutByDesign[1]>(fresh: readonly T[], backlog: Backlog): T[];