feat(webhooks,messaging)!: webhooks deliver via the shared HTTP outbox (ADR-0018 M3 Phase 5)#1484
Merged
Merged
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What
Completes ADR-0018 M3 by cutting
plugin-webhooksover 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 Flowhttpnode 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:MessagingServicegainsredeliverHttp(id)+listHttp(filter)over the HTTP outbox (backs the webhook redeliver endpoint / admin).@objectstack/plugin-webhooks—MessagingServicePlugin(declared as a plugin dependency; it's a foundational always-on capability).AutoEnqueuerenqueuessource: 'webhook'rows viamessaging.enqueueHttp—dedupKey = '<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.POST /api/v1/webhooks/redeliver) now callsmessaging.redeliverHttp.sys_webhook_deliveryobject — deliveries are rows insys_http_delivery(source = 'webhook'); the Setup nav points there.outbox/sql-outbox/memory-outbox/dispatcher/http-sender/partition/retention+ their tests; dropped the./sqlsubpath export and the now-unusedWebhookDispatcher/*Outbox/RedeliverError/ sender exports.WebhookOutboxPluginOptionsreduced to{ autoEnqueue }(dispatcher / outbox / retention / nodeId options moved toMessagingServicePlugin).AutoEnqueuerconstructor takes anHttpEnqueueFninstead of anIWebhookOutbox.Notes
sys_webhook_deliveryis simply dropped (per maintainer direction).@objectstack/plugin-webhooksis loaded dynamically by the CLI capability loader); remainingsys_webhook_deliverymentions in the tree are doc comments only.Tests
plugin-webhooksauto-enqueuer.test.ts(10) rewired to the shared enqueue function; typecheck + build clean.service-messaging108 green.Builds on #1483.
🤖 Generated with Claude Code