import { type Drift, type Violation } from "./verdict.js"; import type { RegressionSet } from "./regression.js"; import type { ResolvedConfig } from "../types.js"; /** * How many times a violation must reproduce before it is believed. * * Each round re-judges only what still fails, so the cost falls away as the * dispute narrows. Three is where a per-requirement miss rate around one in ten * stops being able to manufacture a violation on its own, and the control round * then has to agree that the unchanged skills still hold the ground. */ export declare const CONFIRM_ATTEMPTS = 3; export interface GateOutcome { /** Reproduced under the candidate, and not reproduced without it. */ violations: Violation[]; /** Satisfied, but under a sibling category in the same lane. */ drift: Drift[]; /** Failed under the candidate AND with the candidate withdrawn. */ stale: Violation[]; /** Failed once and not again: the judge's own run-to-run spread. */ unreproduced: Violation[]; costUsd: number; /** How many replays the verdict took, control included. */ rounds: number; } export interface GateOptions { amendedSkill: string; /** * Run something with the candidate withdrawn and put it back afterwards. * * The control needs the unchanged prompts on disk, and only the caller knows * how this project's skill layer is written and restored. */ withoutCandidate: (fn: () => Promise) => Promise; } export declare function runGate(resolved: ResolvedConfig, set: RegressionSet, model: string, opts: GateOptions): Promise;