Skip to content

feat(automation,messaging): unified http/notify executors + generic HTTP outbox (ADR-0018 M3) - #1483

Merged
xuyushun441-sys merged 2 commits into
mainfrom
feat/adr-0018-m3-http-notify
Jun 1, 2026
Merged

feat(automation,messaging): unified http/notify executors + generic HTTP outbox (ADR-0018 M3)#1483
xuyushun441-sys merged 2 commits into
mainfrom
feat/adr-0018-m3-http-notify

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

What

Implements ADR-0018 M3 — introduce outbox-backed http / notify executors and register http_request / http_call / webhook as deprecated aliases.

The generic, reliable outbound-HTTP delivery outbox is promoted into service-messaging (the raw-callout counterpart to the notification outbox) and the Flow http node routes through it, closing the "http_request is a bare fetch() with no retry" reliability gap. The five divergent outbound verbs collapse onto canonical http / notify.

Changes

service-messaging (new, additive):

  • http-outbox.tsIHttpOutbox / HttpDelivery generic raw-callout shape (source/refId/dedupKey/label/signingSecret), HttpRedeliverError
  • http-sender.tssendOnce + classifyAttempt + 7-step jittered retry schedule
  • http-dispatcher.tsHttpDispatcher (per-partition cluster lock, claim/ack), reusing the existing DispatchCluster
  • sql-http-outbox.ts + objects/http-delivery.object.ts (sys_http_delivery) — durable store; dedup (source, dedup_key), partition affinity on ref_id
  • memory-http-outbox.ts — in-memory backend for tests
  • MessagingService gains setHttpOutbox() / isHttpDeliveryReady() / enqueueHttp(); the plugin wires SqlHttpOutbox + HttpDispatcher at kernel:ready

service-automation:

  • canonical http executor — durable: true enqueues onto the messaging HTTP outbox (retry/dead-letter); otherwise an inline fetch() preserving http_request's request/response semantics
  • engine.registerNodeAlias() — delegating executor + deprecated/aliasOf descriptor; http_request / http_call / webhook registered as aliases of http (old flows keep running)
  • notify descriptor marked needsOutbox (its delivery is outbox-backed via emit)

spec:flow.zod adds http to the builtin node-type seed set.

Tests

  • New: http-outbox.test.ts (6), http-nodes.test.ts (7)
  • Full suites green: service-messaging 108, service-automation 125; spec / plugin-approvals / rest build clean

Follow-up (not in this PR)

  • Phase 5 — cut plugin-webhooks over to the shared sys_http_delivery outbox (it still uses its own sys_webhook_delivery outbox/dispatcher). The generic substrate is already in place and shared-ready.

🤖 Generated with Claude Code

…TTP outbox (ADR-0018 M3)
Promotes a generic, reliable outbound-HTTP delivery outbox into
service-messaging and routes the Flow `http` node through it, closing the
"http_request is a bare fetch with no retry" gap. Collapses the five divergent
outbound verbs onto canonical `http` / `notify`.
service-messaging (new, additive):
- http-outbox.ts: IHttpOutbox / HttpDelivery (generic raw-callout shape:
source/refId/dedupKey/label/signingSecret), HttpRedeliverError
- http-sender.ts: sendOnce + classifyAttempt + 7-step jittered retry schedule
- http-dispatcher.ts: HttpDispatcher (per-partition cluster lock, claim/ack)
- sql-http-outbox.ts + objects/http-delivery.object.ts (sys_http_delivery):
durable store; dedup (source, dedup_key), partition affinity on ref_id
- memory-http-outbox.ts: in-memory backend for tests
- MessagingService gains setHttpOutbox()/isHttpDeliveryReady()/enqueueHttp();
plugin wires SqlHttpOutbox + HttpDispatcher at kernel:ready
service-automation:
- canonical `http` executor: durable mode enqueues onto the messaging HTTP
outbox (retry/dead-letter), else inline fetch preserving http_request
request/response semantics
- engine.registerNodeAlias(): delegating executor + deprecated/aliasOf
descriptor; http_request / http_call / webhook registered as aliases of `http`
- notify descriptor marked needsOutbox (emit is outbox-backed)
spec: flow.zod adds `http` to the builtin node-type seed set
Tests: http-outbox (6) + http-nodes (7); full suites green
(service-messaging 108, service-automation 125). plugin-webhooks cut-over to
the shared outbox is a follow-up (Phase 5).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercelBot commented Jun 1, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
specReadyReadyPreview, CommentJun 1, 2026 6:38pm

Request Review

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@xuyushun441-sys
xuyushun441-sys merged commit 955d4c8 into mainJun 1, 2026
7 of 8 checks passed
@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation tooling labels Jun 1, 2026
xuyushun441-sys added a commit that referenced this pull request Jun 1, 2026
…x (ADR-0018 M3 Phase 5) (#1484)
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: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/xlteststooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@xuyushun441-sys@os-zhuang