pub fn record_subscription_event(
db_path: &Path,
sub_id: &str,
correlation_id: &str,
event_type: &str,
payload: &str,
) -> Result<()>Expand description
v0.7.0 K6 — append a subscription_events audit row for one
outgoing delivery. Called from the dispatch worker BEFORE the
network send so replay-from-cursor (K7) sees a stable record even
if the dispatcher process crashes mid-retry. The row is created
with delivery_status = 'pending'; [update_event_status]
transitions it to 'ack' / 'failed' once the retry ladder
settles.