import type { Database } from "./db-types.js"; export declare const SCHEMA_VERSION = 30; export declare function rebuildThreadRegistryWithExitedStatus(db: Database, existingColumns: string[]): void; /** * Label pre-column tombstones (valid_to set, expiry_reason NULL) with the most * that can be *proven* about who expired them — measured on the 2026-07-26 * incident DB, but every rule below is derived from writer code, not from that * one dataset: * * 1. `superseded_by IS NOT NULL` → 'superseded'. Structural. * 2. Bulk clusters (≥10 rows, same thread, byte-identical valid_to — the * signature of a single-nowISO() loop): * - on a dead/archived/unregistered thread, only archiveNotesForThread ever * produced that → 'archived-legacy'; * - on a live thread the sweep never ran; if the cluster is 100% * '[REFLECTION]%' rows it can only be enforceReflectionCap's buffer trim * → 'reflection-cap' (e.g. the predicted 635-row trim of restored * reflections on thread 1327 at 2026-07-26T01:02:55); * - a mixed cluster on a live thread is ambiguous → falls through to 3. * 3. Everything else → 'unknown-legacy'. Pruning singles, gate kills and * small sweeps are indistinguishable after the fact; no guess is recorded * as fact. These stay dead unless their thread is explicitly unarchived. * * Exported for tests; idempotent (only touches expiry_reason IS NULL rows). */ export declare function backfillExpiryReasons(db: Database): void; export declare function runMigrations(db: Database): void; //# sourceMappingURL=migration-runner.d.ts.map