Summary
Complete the webhook delivery unification started in #194. This issue covers Phases 2 and 3 of the design.
Design spec: docs/superpowers/specs/2026-03-29-webhook-delivery-unification-design.md
Background
Issue #194 (Phase 1) unified the addon invocation webhook payload and headers to match resource-change webhooks, and renamed invocation_id to delivery_id. This issue completes the convergence by building a unified Redis-backed delivery pipeline.
Design Decisions
- All delivery state moves to Redis (replacing both Postgres
webhook_deliveries and Redis AddonInvocation stores)
- Any webhook delivery can use
X-TMI-Callback: async for bidirectional status callbacks (not just addon invocations)
- Addon invocations emit events to Redis Streams and flow through the same delivery worker as resource-change events
- New
GET /webhook-deliveries/{id} endpoint supports JWT or HMAC authentication
- New
POST /webhook-deliveries/{id}/status endpoint replaces POST /invocations/{id}/status
Redis TTLs
pending / in_progress: 4 hours
failed / completed / delivered: 7 days
Phase 2: Unified Redis Delivery Model + Migrate Addon Invocations
Phase 3: Migrate Resource-Change Deliveries from Postgres to Redis
Summary
Complete the webhook delivery unification started in #194. This issue covers Phases 2 and 3 of the design.
Design spec:
docs/superpowers/specs/2026-03-29-webhook-delivery-unification-design.mdBackground
Issue #194 (Phase 1) unified the addon invocation webhook payload and headers to match resource-change webhooks, and renamed
invocation_idtodelivery_id. This issue completes the convergence by building a unified Redis-backed delivery pipeline.Design Decisions
webhook_deliveriesand RedisAddonInvocationstores)X-TMI-Callback: asyncfor bidirectional status callbacks (not just addon invocations)GET /webhook-deliveries/{id}endpoint supports JWT or HMAC authenticationPOST /webhook-deliveries/{id}/statusendpoint replacesPOST /invocations/{id}/statusRedis TTLs
pending/in_progress: 4 hoursfailed/completed/delivered: 7 daysPhase 2: Unified Redis Delivery Model + Migrate Addon Invocations
WebhookDeliveryRedisStorewith unified delivery recordPOST /webhook-deliveries/{id}/statusendpoint (replacesPOST /invocations/{id}/status)GET /webhook-deliveries/{id}endpoint with JWT+HMAC dual auth (replacesGET /invocations/{id})GET /invocationslist endpointPOST /addons/{id}/invoketo create unified delivery records and emit to Redis StreamsAddonInvocationWorkerandAddonInvocationStoreaddon.invokedevents throughWebhookEventConsumer→ unified delivery workerX-TMI-Callback: asyncresponse handling to delivery workerPhase 3: Migrate Resource-Change Deliveries from Postgres to Redis
WebhookEventConsumerto create Redis delivery records instead of Postgres/admin/webhooks/deliveries/*) to read from RedisGormWebhookDeliveryStoreandwebhook_deliveriesPostgres table