import type { Check } from '../types.js'; /** * ADR-015 rule 6 ("state the denominator"): reports K (currently * quarantined) of N (cumulative envelopes ever spooled, `SpoolStats. * totalSpooled` — src/ingest/spool.ts), not a bare count. A canary that can * only ever go green is decoration (same doc, same rule) — this one goes RED * when a quarantined file has outlived `DEFAULT_QUARANTINE_TTL_MS`, which * means the TTL sweep (`pruneExpiredQuarantine`, run once per spool-drain * tick) failed to remove it — a real, actionable signal, not a restated * config value. Content in `.quarantine/` is already redacted at spool-write * time (src/ingest/spool-schema-guard.ts `redactSpooledEnvelope`, called from * `writeToSpool`) regardless of what this check finds; this check is about * retention hygiene, not secret exposure. * * Fast-follow (2026-07-13, Finding 3): the denominator N comes from * `SpoolStats.statsHealthy` now — a missing/corrupt `.stats.json` with real * spool activity already on disk reports `inconclusive: true` ("denominator * unavailable") instead of fabricating a green "0 of 0". The TTL RED branch * is evaluated first and is deliberately independent of `statsHealthy` — it * is computed straight from `readdirSync`/`mtimeMs`, so a lost stats file * can never silence a real "file outlived its TTL" alarm. */ export declare function checkSpoolQuarantine(dataDir: string): Check;