Skip to content

feat(webhooks,messaging)!: webhooks deliver via the shared HTTP outbox (ADR-0018 M3 Phase 5)#1484

Merged
xuyushun441-sys merged 1 commit into
mainfrom
feat/adr-0018-m5-webhooks
Jun 1, 2026
Merged

feat(webhooks,messaging)!: webhooks deliver via the shared HTTP outbox (ADR-0018 M3 Phase 5)#1484
xuyushun441-sys merged 1 commit into
mainfrom
feat/adr-0018-m5-webhooks

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

What

Completes ADR-0018 M3 by cutting plugin-webhooks over to the shared outbound-HTTP delivery substrate introduced in #1483. Webhooks stop being their own delivery engine — the durable outbox, cluster-coordinated dispatcher, retry/backoff/dead-letter, and retention now live once in @objectstack/service-messaging (sys_http_delivery + HttpDispatcher) and are shared by the Flow http node and webhook fan-out alike.

This is the "build the reliability machinery once, reuse it everywhere" goal of ADR-0018 §4, fully realized.

Changes

@objectstack/service-messaging:

  • MessagingService gains redeliverHttp(id) + listHttp(filter) over the HTTP outbox (backs the webhook redeliver endpoint / admin).

@objectstack/plugin-webhooks⚠️ BREAKING:

  • Now requires MessagingServicePlugin (declared as a plugin dependency; it's a foundational always-on capability).
  • AutoEnqueuer enqueues source: 'webhook' rows via messaging.enqueueHttpdedupKey = '<webhookId>:<eventId>' (preserves the old (event_id, webhook_id) at-most-once enqueue), refId = webhookId (partition affinity), label = eventType, signingSecret = secret. Still fire-and-forget, off the write path.
  • Redeliver endpoint (POST /api/v1/webhooks/redeliver) now calls messaging.redeliverHttp.
  • Removed the sys_webhook_delivery object — deliveries are rows in sys_http_delivery (source = 'webhook'); the Setup nav points there.
  • Deleted: outbox / sql-outbox / memory-outbox / dispatcher / http-sender / partition / retention + their tests; dropped the ./sql subpath export and the now-unused WebhookDispatcher / *Outbox / RedeliverError / sender exports.
  • WebhookOutboxPluginOptions reduced to { autoEnqueue } (dispatcher / outbox / retention / nodeId options moved to MessagingServicePlugin).
  • AutoEnqueuer constructor takes an HttpEnqueueFn instead of an IWebhookOutbox.

Notes

  • No data migration — system is not yet live, so sys_webhook_delivery is simply dropped (per maintainer direction).
  • No source code imported the removed exports (@objectstack/plugin-webhooks is loaded dynamically by the CLI capability loader); remaining sys_webhook_delivery mentions in the tree are doc comments only.

Tests

  • plugin-webhooks auto-enqueuer.test.ts (10) rewired to the shared enqueue function; typecheck + build clean.
  • service-messaging 108 green.

Builds on #1483.

🤖 Generated with Claude Code

…x (ADR-0018 M3 Phase 5)

plugin-webhooks no longer ships its own delivery engine. The durable outbox,
cluster-coordinated dispatcher, retry/backoff/dead-letter, and retention are
removed and replaced by the generic sys_http_delivery outbox + HttpDispatcher in
service-messaging (promoted in #1483). Webhooks keep only their domain concerns:
the sys_webhook config object, the AutoEnqueuer, and the redeliver endpoint.

service-messaging:
- MessagingService gains redeliverHttp(id) + listHttp(filter) over the HTTP outbox

plugin-webhooks (BREAKING):
- requires MessagingServicePlugin (declared dependency)
- AutoEnqueuer enqueues source='webhook' rows via messaging.enqueueHttp
  (dedupKey '<webhookId>:<eventId>', refId=webhookId, label=eventType,
  signingSecret=secret) — fire-and-forget, off the write path
- redeliver endpoint backed by messaging.redeliverHttp
- removed sys_webhook_delivery object; Setup nav points at sys_http_delivery
- deleted outbox/sql-outbox/memory-outbox/dispatcher/http-sender/partition/
  retention + their tests; dropped the ./sql subpath export
- WebhookOutboxPluginOptions reduced to { autoEnqueue }
- AutoEnqueuer constructor takes an HttpEnqueueFn instead of IWebhookOutbox

No data migration (system not yet live). Tests: plugin-webhooks auto-enqueuer
(10) rewired to the shared enqueue; service-messaging 108 green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Building Building Preview, Comment Jun 1, 2026 6:45pm

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file tests tooling size/xl labels Jun 1, 2026
@xuyushun441-sys xuyushun441-sys merged commit 11905fa into main Jun 1, 2026
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/xl tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants