import { type QualityFixture, type SurfaceFixture } from './harness.js'; import type { EvaluationScenario } from './seed.js'; export declare const BASELINE_TRAILER = "Baseline-Regenerated:"; export interface EvalGateOptions { suitesDir?: string; baselinesDir?: string; coveragePath?: string; /** Project root used to seed the hermetic store. */ rootPath?: string; } export interface GateSuiteResult { suite: string; ok: boolean; /** One entry per gated metric or fixture that failed. */ regressions: string[]; } export interface GateKindCoverage { ok: boolean; uncovered: string[]; grandfathered: string[]; } export interface GateResult { ok: boolean; suites: GateSuiteResult[]; kindCoverage: GateKindCoverage; /** Rendered report, ready to print. */ lines: string[]; } /** A file touched by a commit, with its git status letter (A/M/D/R…). */ export interface ChangedFile { path: string; status: string; /** Rename source, when git reported one. */ from?: string; } /** One commit's contribution to a push or pull request. */ export interface CommitRecord { body: string; files: ChangedFile[]; } export interface BaselineJustificationVerdict { ok: boolean; reason?: string; } interface QualitySuiteFile { fixtures: QualityFixture[]; seed?: EvaluationScenario; surfaces?: SurfaceFixture[]; } /** * A kind that no fixture seeds is not penalised by the suites — it is invisible * to them, and they report green (AD-5). So the registry, not the suites, is the * source of truth for what must be covered. */ export declare function checkKindCoverage(suites: QualitySuiteFile[], coveragePath: string): GateKindCoverage; export declare function runEvalGate(options?: EvalGateOptions): GateResult; export interface RegenerationReport { suite: string; baselinePath: string; /** Regressions the regeneration bakes in, when a previous baseline existed. */ accepted: string[]; } /** * Write a baseline. Reachable only behind an explicit flag: the gate itself * never writes one, so a red build cannot quietly become green. */ export declare function regenerateBaseline(suiteName: string, options?: EvalGateOptions): RegenerationReport; /** * A locked artifact may change, but the reason must travel with the commit that * changed it. Checking the range as a whole let an unrelated commit's trailer — * or one written by someone else on the base branch — launder the change. */ export declare function checkBaselineJustification(commits: CommitRecord[]): BaselineJustificationVerdict; export {}; //# sourceMappingURL=gate.d.ts.map