import type { MetricMeasurer } from "./evaluator.js"; /** * v0.4 — reconciliation / `solosquad goal verify`. * * Per docs/plan/v0.4-autonomous-engine.md §2.1 rule 2 and §5 * "provenance 컬럼" — same commit + same provenance must re-compute to * the same value. This is the Data Reconciliation defense against * Goodhart drift. * * Flow: * 1. Look up the cycle's stored measurements in results.tsv. * 2. Find the keep commit (or pre-cycle commit for discard cycles). * 3. Check out the engine snapshot tree at that commit (snapshot.git * worktree). Pure read — does NOT mutate the user's working tree. * 4. Re-run the measurer for each metric. * 5. Compare to recorded value within a tolerance. */ export interface VerifyOutcome { cycle: number; commit: string; deterministic: boolean; /** Per-metric replay result. */ metrics: Array<{ name: string; recorded: number; replayed: number; delta: number; pass: boolean; /** True iff replayed value crosses the threshold the same way. */ statusMatch: boolean; }>; } export interface VerifyOpts { workspace: string; orgSlug: string; goalId: string; cycle: number; /** Numeric tolerance for value comparison. Default 1e-6. */ tolerance?: number; } export declare function verifyCycle(opts: VerifyOpts, measurer: MetricMeasurer): Promise;