Skip to content

[factory] Delivery options: envelope, deliveryHeaders, nonRetryableStatuses — pr-open - #60

Open
NickolasBenakis wants to merge 2 commits into
mainfrom
factory/mcp-events-1
Open

NickolasBenakis wants to merge 2 commits into
mainfrom
factory/mcp-events-1

Conversation

@NickolasBenakis

Copy link
Copy Markdown
Owner

Three delivery options for receivers with their own conventions. MCP Events webhook mode (SEP-3415) needs all three; they're general enough to stand alone.

  • envelope: false sends the payload itself as the signed body, instead of {"type","timestamp","data"}.
  • deliveryHeaders(delivery) adds request headers per attempt, e.g. a routing id. It can't set content-type, user-agent or webhook-*; if it throws, the attempt fails and is retried.
  • nonRetryableStatuses (e.g. [410, 413]) fails a delivery on the first such response and leaves the endpoint's health alone, since the receiver answered.

Defaults are unchanged, so existing deliveries behave exactly as before.

Verification

  • pnpm typecheck, pnpm lint, pnpm test: 347 tests pass, 10 of them new in test/delivery-options.test.ts.

Decision Log

  • Instance-level options, not per-endpoint, so no migration. envelope is applied when a worker builds the body, so the workers' setting is what counts (documented).
  • Statuses below 300 or above 599 are rejected for nonRetryableStatuses.

Follow-ups

  • Per-endpoint headers stored in the database, if someone needs different headers per customer.

🤖 Generated with Claude Code

NickolasBenakis and others added 2 commits November 13, 2026 23:07
For receivers with their own delivery conventions, such as MCP Events
webhook mode: send the payload as the body, add per-attempt headers, and
fail a delivery at once on statuses like 410 without hurting endpoint health.

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

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
hookgres Ready Ready Preview Nov 13, 2026 9:30pm UTC

@NickolasBenakis NickolasBenakis changed the title [factory] Delivery options: envelope, deliveryHeaders, nonRetryableStatuses — in-review [factory] Delivery options: envelope, deliveryHeaders, nonRetryableStatuses — pr-open Nov 13, 2026
@NickolasBenakis
NickolasBenakis marked this pull request as ready for review November 13, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant