import type { FindingConsensus } from "./consensus.js"; import type { AiFinding } from "../judge/engine.js"; import type { HandRoll } from "../design/inventory.js"; import type { CaptureReport, DeterministicFinding, FormFactor, PlatformKind, Scheme, ShotRecord } from "../types.js"; import type { BacklogFinding } from "./lib.js"; /** * A finding that was photographed, and therefore carries the capture axes. * * Everything that renders a finding against a screenshot needs this: a * code-channel finding has no viewport, no scheme and no image, so a board * tile, a contact sheet entry or a frozen regression case cannot be built from * one. Narrowing through this guard is what makes that a compile-time fact * rather than a convention somebody has to remember. */ export type PhotographedFinding = BacklogFinding & { platform: PlatformKind; formFactor: FormFactor; scheme: Scheme; }; export declare function wasPhotographed(f: BacklogFinding): f is PhotographedFinding; /** Deterministic findings from a capture report, as backlog-shaped findings. */ export declare function deterministicToFindings(report: CaptureReport, opts?: { shellIdentity?: boolean; }): Omit[]; /** Every deterministic type ingestion knows, for the backlog's own check. */ export declare const DETERMINISTIC_TYPES: DeterministicFinding["type"][]; /** AI findings (from a check run) joined with their shots. */ export declare function aiToFindings(findings: (AiFinding & { verified?: boolean; verifierNote?: string; consensus?: FindingConsensus; })[], shotsById: Map, opts?: { /** * The shellScoping transition flag. Off, the region is stored but identity * stays route-keyed, so records accumulate regions a person can inspect; * on, a shell region takes the route's slot in the fingerprint and the * merge folds the route-scoped history it supersedes. */ shellIdentity?: boolean; }): ReturnType; /** * Hand-rolled duplicates of kit components, as backlog-shaped findings. * * This is the code channel's only producer, and it is deliberately the only * kind of claim on it: a component the application built out of raw elements in * a project that has a design system providing the same thing. That is decidable * by reading the source, which is what makes it safe to file. lookout can rule * on it later by reading the source again, so `verify-fix` still closes it on * evidence rather than on the fixer's say-so. * * Severity is fixed at medium. A duplicated control is a real defect (it drifts * from the kit the moment either changes, and it is invisible to the kit's own * tests) and it is never an emergency, so ranking it against a broken render * would be false precision. */ export declare function handRollsToFindings(handRolls: HandRoll[], kitName: string, target: string): ReturnType;