/** * What produced a baseline number. One consumer's `migrationWarnings` read 51 for eleven days over * an unchanged tree while the truth was 58: our own output truncation was cutting the report. * Evidence, never a floor. */ export type Instrument = { /** `null` for a counter that runs none (`lawLineCount` reads a file). */ command: string | null; fingerprint: string; params: Record; reads: Record; version: string; }; export type MeasurementIdentity = Instrument & { /** When the baseline was edited by hand since, the identity is unknown. */ recordedFor: number; /** * The number this one overwrote, `null` for an adoption. A consumer who corrects a truncated 51 * up to 58 and meets a build still reading 51 would bank it as "improved -7"; keeping the * overwritten number makes that recoverable. */ replaced: number | null; }; type RecordedIdentity = Omit & { fingerprint?: string; params?: Record; reads?: Record; }; export type IdentityFile = { entries: Record; unreadable: string | null; }; export type IdentityVerdict = { differs: string[]; verdict: 'changed'; was: RecordedIdentity; } | { verdict: 'same'; } | { verdict: 'unchecked'; } | { reason: string; verdict: 'unknown'; }; export declare const identityPathFor: (baselinePath: string) => string; export declare const readIdentities: (path: string) => IdentityFile; export declare const writeIdentities: (path: string, recorded: Record) => void; export declare const paramsOf: (entry: Record) => Record; export declare const NEVER_READ: Set; export declare const digestsOf: (cwd: string, patterns: readonly string[]) => Record; export declare const compareIdentity: ({ baseline, file, key, now }: { baseline: number; file: IdentityFile; key: string; now: Instrument; }) => IdentityVerdict; export type Direction = 'grew' | 'shrank'; export declare const explainIdentity: ({ direction, verdict }: { direction: Direction; verdict: IdentityVerdict; }) => string; export {};