import type { FixProposal, OwnershipModel, SchemaSnapshot } from "../types.js"; export interface VerifyOptions { connectionString: string; snapshot: SchemaSnapshot; model: OwnershipModel; fixes: FixProposal[]; mode?: "read_only" | "full"; } export interface VerifyOutcome { fixes: FixProposal[]; /** True when every fix closed its holes and broke nothing. */ allVerified: boolean; /** Raised when the SQL itself would not apply. */ applyError: string | null; } /** * Apply the generated policies, then run the whole suite again against them. * * A fix is not offered to anyone until this passes. Two conditions, both * required: every hole it claimed to close is actually closed, and no owner lost * access to their own data. The second is the one that matters — a policy that * denies everybody would satisfy the first condition perfectly, and shipping one * of those is worse than shipping nothing. * * Postgres applies DDL transactionally, so the policies are created, exercised, * and rolled back inside a single transaction. Nothing is written to the target * database, and no shadow copy is needed. */ export declare function verifyFixes(opts: VerifyOptions): Promise; /** Only fixes that proved themselves are safe to put in front of a human. */ export declare function verifiedOnly(fixes: FixProposal[]): FixProposal[];