feat(webhook): durable outbox with retry and dead-letter (opt-in) - #1707
Open
manuc66 wants to merge 2 commits into
Open
feat(webhook): durable outbox with retry and dead-letter (opt-in)#1707manuc66 wants to merge 2 commits into
manuc66 wants to merge 2 commits into
Conversation
16 tasks
Follow-up to the base webhook PR (simple best-effort POST). With --webhook-durable-outbox / webhook_durable_outbox / WEBHOOK_DURABLE_OUTBOX (default: off), events are written to an outbox first and retried at startup and after each scan (backoff on 408/429/5xx), with permanent 4xx dead-lettered to <id>.failed.json instead of being lost. Entries are written with mode 0600 and survive restarts. The HTTP POST is shared with the best-effort path (sendEventOnce).
manuc66
force-pushed
the
split/webhook-outbox-durable
branch
from
September 5, 2026 06:52
5743e36 to
8683ccf
Compare
…ble branch # Conflicts: # test/postProcessing.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The base webhook PR delivers events best-effort: a single POST, and a briefly unreachable receiver (n8n down, 429, timeout) loses the event.
Solution
An opt-in durable outbox behind
--webhook-durable-outbox/webhook_durable_outbox/WEBHOOK_DURABLE_OUTBOX(default: off, keeping the simple best-effort path):0600) before delivery.<id>.failed.jsoninstead of being lost.sendEventOnce).Stacked on the webhook PR (
split/webhook-outbox): merge that one first, then this one.Review checklist
Already fixed (verify):
maxRedirects: 0, 3xx → retry).Outbox reliability:
pathwhenkeepFiles: false— mark it unavailable (path: null)..tmpcleanup.Testing
test/webhook.test.ts(outbox suite): retry with the same idempotency key, 4xx dead-letter, 429/5xx retry, max-attempts cap, restart survival, mode0600, redirect handling.704 passing).