caelum0x f61049d2f0 feat(cli): add audit-check, a live cross-check between ledger-core and audit-log
docs/THREAT-MODEL.md's "Known gaps" #3: no operational cross-check
existed between ledger-core's own entry/decision counts and audit-log's
best-effort mirror, even though audit_mirror.rs's mirroring can fail
silently (network blip, audit-log down) with nothing comparing the two
afterward.

`ration audit-check` dials audit-log directly (new Audit client on
clients.go) and, per tenant, fully paginates both ledger-core's
ListEntries/ListAgentDecisions and audit-log's ListRecords (filtered by
SourceKind), reporting any count divergence beyond --tolerance and
exiting nonzero. Verified live against the demo stack: 18/18 tenants
report OK with exact count matches.

Wire the diagnosis path into docs/RUNBOOK.md next to the existing
on-call-style entries.
2026-10-23 18:54:08 +03:00
..