Summary
Webhook retries compute their delay inline and emit no structured log when all attempts are exhausted. A shared delay helper and a dedicated exhaustion log together make the retry system both consistent and observable.
Scope
- Add
computeRetryDelay(attempt: number, baseMs: number, maxMs: number): number — delay doubles per attempt up to maxMs, plus random jitter up to 20% of the computed delay; add unit tests for attempt 0, 1, 2, and maxMs capping
- Emit a structured error log on retry exhaustion with fields:
webhook_id, creator_id, event_type, total_attempts, last_error_code, flagged_at; callback URL must be absent from the log
- The exhaustion log emits once per exhaustion event — not on each individual retry failure
- Replace all inline delay calculations with the new helper
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
Webhook retries compute their delay inline and emit no structured log when all attempts are exhausted. A shared delay helper and a dedicated exhaustion log together make the retry system both consistent and observable.
Scope
computeRetryDelay(attempt: number, baseMs: number, maxMs: number): number— delay doubles per attempt up to maxMs, plus random jitter up to 20% of the computed delay; add unit tests for attempt 0, 1, 2, and maxMs cappingwebhook_id,creator_id,event_type,total_attempts,last_error_code,flagged_at; callback URL must be absent from the logAcceptance Criteria
ETA: 12 hours
Coordinate on Telegram