Deliveries
What this is for
Deliveries is the outbound delivery log — every webhook/integration delivery attempt, its status, retries, and response. It is primarily a diagnostic, read-mostly page: use it to confirm an event left Spine, to debug a failing endpoint, and to see retry behavior.
Why it exists
Webhooks are unreliable by nature — arrivals get lost, retries duplicate, senders time out. Without a ledger, "did the delivery happen?" is a guess.
Why it exists (5-whys):
- Async external I/O needs durability — arrivals get lost and retries duplicate; the crossing of the trust boundary must be recorded.
direction+statuslifecycle (pending → processing → delivered/failed/cancelled) covers both inbound receipt and outbound send — same reliability problem, one ledger.attempt_count/max_attempts/next_attempt_atput retry state on the row, not in-process memory —deliveries.tsredrives failed sends after restarts (manualretryfor outbound is permission-checked).external_id+payload+response_*provide idempotency and forensics — dedupe redeliveries, reconstruct what happened without guessing.- Root: async external I/O needs a ledger like pipelines need executions —
webhook_deliveriesmakes every crossing of the trust boundary durable, retryable, and inspectable. (confirmed 2026-11-13)
Fields and settings
- Direction —
inbound(external webhook into Spine) oroutbound(Spine calling an integration). - Status —
pending,processing,delivered, orfailed. Pending rows with a futurenext_attempt_atare scheduled retries. - Integration — the
integration_idthe delivery ran through. - Handler / Action —
handler_name(inbound webhook handler) oraction_slugthat produced it. - Attempts —
attempt_count / max_attempts.max_attemptsdefaults to 3, overridable per call (action_config.max_attempts) or per integration (config.retry_policy.max_attempts). - Next Attempt / Created — scheduled retry time and queue time.
response_statusandlast_erroron the row capture the last attempt's result.
Downstream effects
- A
failedrow means the endpoint rejected or timed out andattempt_countreachedmax_attempts— fix the endpoint or credentials, then retry via the API (deliveries?action=retry, outbound only; system principals may retry any account's delivery, others only their own) or re-fire the event. - Retries reuse the same row:
attempt_countincrements andnext_attempt_atfollows exponential backoff (30s × 2^attempt, capped at 1h, +20% jitter).system-cronsweeps duependingrows each tick. - Deliveries are produced by
integration-outbound(outbound) andintegration-routes(inbound) — an empty list with active webhooks usually means no events matched, not a broken delivery layer. - Rows are append-only diagnostics; there is nothing to create or edit on this page.
Minimal configuration
N/A — deliveries are generated by outbound calls, not authored. To produce one: create an integration-routes/webhook integration (or a trigger with an outbound stage), then emit its event.
Full configuration
N/A — see integrations for endpoint/credential configuration, triggers/pipelines for what fires deliveries.
Example
A support app's customer-webhooks integration posts every ticket.closed event to the customer's endpoint; a failed delivery with response 401 points at an expired token — rotate it in the integration's credentials, not here.
Core files
.framework/functions/deliveries.ts— API (list/get/action=retry).framework/functions/integration-outbound.ts— outbound broker that writes delivery rows.framework/functions/integration-routes.ts— inbound webhook path that writes inbound rows.framework/functions/_shared/retry-deliveries.ts— scheduled sweep of duependingrows.framework/src/pages/admin/DeliveriesPage.tsx— admin UI- Table:
public.webhook_deliveries
Agent notes
- Debug order: delivery row → integration config/credentials → the event producer (trigger/pipeline). The delivery row is the symptom, not the cause.
- Repeated failures across one endpoint usually mean credentials or URL drift; failures across many endpoints point at the outbound broker or networking.
- Delivery volume doubles as an activity signal for integrations — a silent integration shows up here first.