import { MemoryEntry } from './memory.js'; export interface CorrectionPair { oldId: string; newId: string; correctedAt: string; observedAt: string; latencyMs: number; /** 'extraction' = new fact derived from a raw receipt; 'manual' = direct supersede call */ via: 'extraction' | 'manual'; } export interface CorrectionLatencyReport { count: number; manualCount: number; extractionCount: number; /** Percentiles computed over `extraction` pairs only — manual pairs have no measurable lag */ p50Ms: number | null; p95Ms: number | null; maxMs: number | null; pairs: CorrectionPair[]; } /** * Correction latency = wall-clock delta between when hippo first saw the * change-of-truth and when the supersession actually landed. * * For each (old, new) chain via `old.superseded_by = new.id`: * - `correctedAt` = `new.created` (always) * - `observedAt` = source row's `created` if `new.extracted_from` is set, * else `new.created` (no earlier observation possible) * * Pairs split into two cohorts: * - `extraction` — derived from a raw receipt; latency is meaningful * - `manual` — direct supersede call; latency is trivially 0 and * excluded from percentiles to avoid masking real lag */ export declare function buildCorrectionLatency(entries: MemoryEntry[]): CorrectionLatencyReport; //# sourceMappingURL=correction-latency.d.ts.map