/** * The open-time row-identity fill under capture (journal spec §2.3a rule 1; * the S2 capture interactions of T12806 and T12801). * * The fill, the refill of pre-release fingerprints and the graveyard re-link * are DERIVED rewrites: every value they write is a deterministic function of * the store (spec §12.1), and a refill runs only before any uid has synced. * Capturing them would journal one K and one F per filled row under shadow * capture. So on a store with the sync schema they run inside * {@link withSyncTriggersSuspended}, and the tables they wrote are marked * suspect, for the sealer's repair diff (S3). * * One exception is journaled: a row whose identity a CAPTURED write cleared * (a snapshot-overwrite import, K old → NULL) gets the K that records its * new uid ({@link captureRemints}), in a `remint` frame, so the pair nets to * old → new instead of leaving the new identity unjournaled. * * @task T12343 * @module store/sync/identity-fill */ import type { DatabaseSync } from 'node:sqlite'; import type { TableScope } from '@cleocode/contracts'; import { prepareRowIdentity, type RowUidFillReport } from '../row-identity.js'; /** What the open-time fill did under capture. */ export interface IdentityFillUnderCapture { readonly report: RowUidFillReport | null; /** Tables marked suspect (the fill wrote them uncaptured). */ readonly suspect: string[]; /** Re-mint K captures written, per table. */ readonly remints: Record; } /** The tables a fill report says were written. */ export declare function filledTables(scope: TableScope, report: RowUidFillReport): string[]; /** * Run the open-time identity fill ({@link prepareRowIdentity}). With * `sync.capture` on: with the capture triggers dropped, the written tables * marked suspect, and re-mint K captures for identities a captured write * cleared. With it off: exactly {@link prepareRowIdentity}, even when the * sync tables exist (`cleo project link` creates them, T13025). * * Never throws, like {@link prepareRowIdentity}: a failed bracket (busy, * a broken sync schema) is logged and reported as no fill. */ export declare function prepareRowIdentityUnderCapture(db: DatabaseSync, scope: TableScope, options?: Parameters[2]): IdentityFillUnderCapture; //# sourceMappingURL=identity-fill.d.ts.map