export interface AuditSessionLike { run(query: string, params?: Record): Promise<{ records: Array<{ get(key: string): unknown; }>; }>; } export interface AuditFinding { accountId: string; /** Active (non-trashed, not-declined, above-floor) owner preference rows * stored — the count injection is expected to surface verbatim. Task 1564: * owner-scoped, so rows stranded on a non-owner profile are neither counted * nor injected. */ stored: number; /** Rows injection actually surfaces (resolveActiveRules, the exact injection * path). Equal to `stored` unless injection dropped rows. */ injected: number; } /** One reconcile line per flagged account. accountId truncated to 8 for * readability; the two counts are greppable fields. */ export declare function formatAuditLine(f: AuditFinding): string; /** For every account that holds active preferences, compare the stored active * count against the count injection surfaces. Returns a finding ONLY where the * two differ — injection is meant to surface every stored active preference * verbatim (Task 1951), so a gap is a dropped-row regression. Measures against * the exact injection path (resolveActiveRules), so the audit and injection can * never disagree about what "injected" means. */ export declare function auditPreferenceReconciliation(session: AuditSessionLike): Promise; export interface PreferenceAuditDeps { neo4jUri: string; neo4jUser: string; neo4jPassword: string; logger: (line: string) => void; } /** Run one audit pass and log a reconcile line per flagged account. Best-effort * Neo4j — absent env or an unreachable/erroring read logs `unavailable` and * never throws. A clean pass logs a single `op=reconcile drifted=0` line so the * audit's own liveness is visible. */ export declare function emitPreferenceAudit(deps: PreferenceAuditDeps): Promise; export interface PreferenceAudit { start(): void; stop(): void; } /** Standing periodic audit. Unref'd interval so it never holds the process open; * each tick re-emits best-effort. */ export declare function createPreferenceAudit(deps: PreferenceAuditDeps & { intervalMs: number; }): PreferenceAudit; //# sourceMappingURL=preference-reconciliation-audit.d.ts.map