/** * How a visual verify-fix outcome reaches the caller: the JSON payload * verbatim, or the human account with everything the regenerated document * carries about this attempt. The verb decides, this file says. * * A session that stays alive reads stdout; one opened fresh reads the * document. Both have to learn the same facts about the ruling, so the * payload and the printed account are built from one set of arguments here. */ import { type AcceptanceCriterion } from "../issues/acceptance.js"; import type { SheetResult } from "../capture/sheet.js"; import type { ShotMove } from "./moved.js"; import type { RepoObservation } from "../fix/state.js"; import type { BaselineDescription } from "./baseline.js"; import type { Verdict } from "../fix/rule.js"; export interface FixOutcomeArgs { issueId: string; verdict: Verdict; attempt: number; maxAttempts: number; judgeNote: string; ruledCriteria: AcceptanceCriterion[]; spawned: { issue: { id: string; title: string; severity: string; }; causedByThisFix: boolean; }[]; sheet: SheetResult | null; /** Every finding still filed after this ruling, with the judge's account. */ stillOpen: { title: string; shotId: string; observed: string; }[]; changedShots: number; baselineShots: number; totalShots: number; /** How far each changed screenshot moved, largest first, capped at MAX_MOVES. */ moved: ShotMove[]; /** * How many changed screenshots were measured at all, before the cap. Carried * separately because `moved.length` is the truncated list: subtracting it * from `changedShots` counted every move the cap dropped as one nothing could * measure, which is a different and untrue statement. */ measuredShots: number; /** Routes whose pixels did not move since filing. */ unclosable: string[]; reportedCommit: string | null; reportedNote: string | null; observed?: RepoObservation; /** The issue's document, which the save just rewrote with this attempt. */ docPath: string; /** The capture this ruling's screenshots were compared against. */ baseline: BaselineDescription; /** What this ruling photographed. */ photographed: { url: string | null; routes: string[]; }; flags: Record; costUsd: number; learned?: unknown; } /** The `--json` payload: the same facts the printed account and the document carry. */ export declare function fixPayload(a: FixOutcomeArgs): Record; /** What a ruling compared against, said so a reader knows whether a check since the edit could have moved it. */ export declare function baselineSaid(b: BaselineDescription): string; export declare function printFixOutcome(args: FixOutcomeArgs & { json: boolean; payload: Record; }): void;