import type { DatabaseSyncLike } from './db.js'; /** * Path A backfill cleanup: existing raw_archive rows that were archived BEFORE * commit 70180b5 left their markdown mirrors at //.md * with original content intact. The DB is already redacted via migration v20; * this function deletes those filesystem mirrors so RTBF holds for historical * archives too. * * Per-row tracking via raw_archive.mirror_cleaned_at (added in v21): * - SELECT only rows WHERE mirror_cleaned_at IS NULL. * - On success (every layer either deleted or didn't exist), UPDATE the row * with the cleanup timestamp. * - On any unlink failure, leave mirror_cleaned_at NULL so the next * openHippoDb call retries. Warn (capped at MAX_WARN_LOGS rows per call). * * Steady-state cost is one SELECT returning empty after every row has been * cleaned successfully. */ export declare function cleanupArchivedMirrors(hippoRoot: string, db: DatabaseSyncLike): void; //# sourceMappingURL=raw-archive-mirror-cleanup.d.ts.map