- Shipped
- September 23, 2026 at 1:52 AM UTC
- Author
- Kamo
- Commit
- cca40dc
The intake endpoints' received / imported counters are now a ledger (securityservice create_lead_intake_ledger.sql, applied 2026-09-22): a trigger on lead_intake_raw_payloads journals each payload and each change of its imported-ness in the payload's own transaction. - LeadLedgerMaintenance: FOLD_INTAKE (also advances last_received_at to the newest folded payload) and RECONCILE_INTAKE (payload rows vs total + journal, corrections appended, never written over a total); the three intake triggers join the missing-trigger check. - LeadIntakeProcessingJob no longer bumps the endpoint row: a payload marked IMPORTED is the count, and the bump had been losing updates to concurrent inbound POSTs on that one row. Needs kamo-shared-library 78a3f605. SQL replayed against YugabyteDB (temp tables, 24 checks).
