fix(store): preserve audit tables and real TLS modes during salvage #270

Merged
KofTwentyTwo merged 1 commits from story/m6-salvage-fidelity into dev 2026-07-31 17:01:40 +00:00
1 Commits
Author SHA1 Message Date
James Maes 532b18f84a fix(store): preserve audit tables and real TLS modes during salvage
Salvage previously dropped worm_audit_records and filter_execution_logs
entirely, losing tamper-evident audit/ledger history on recovery, and
hardcoded every salvaged account's imap_tls_mode/smtp_tls_mode back to
ImplicitTls regardless of the account's real configured mode. Salvage
now carries both ledger tables through recovery verbatim, including
their hash-chain columns, and reads each account's real TLS modes from
the salvaged row, WARN-logging and falling back only when a raw value
is genuinely unrecognized.

Refs #248
2026-07-31 11:58:27 -05:00