/** * Persistence for atom-validity guard-drop counters (issue #205 follow-up, * migration 038). Mirrors src/storage/relation-guard-log.ts field-for-field — * counts + a reason label only, never the raw date text. * * See migrations/038-validity-guard-drops.sql for why this table exists: it is * the only place that can distinguish "the model never states an end date" (a * REAL zero) from "the model states end dates and the guard rejects every one" * (a BROKEN zero). Both look identical as a zero `valid_to` population count, * which is exactly the ambiguity ADR-015 forbids. */ import type { DB } from './db.js'; export interface ValidityGuardDropRow { reason: string; count: number; } /** * Write one `validity_guard_drops` row per entry with `count > 0`. No-op when * `drops` is empty or every entry is zero. */ export declare function recordValidityGuardDrops(db: DB, drops: ValidityGuardDropRow[], sessionId: string | null): void; /** Total validity-guard drops recorded at or after `since` (epoch ms). */ export declare function totalValidityGuardDrops(db: DB, since: number): number;