Skip to content

Add skipWebhookReconcile for pre-provisioned subscriptions - #25

Merged
alex-w-99 merged 1 commit into
mainfrom
feat/skip-webhook-reconcile
Aug 7, 2026
Merged

Add skipWebhookReconcile for pre-provisioned subscriptions#25
alex-w-99 merged 1 commit into
mainfrom
feat/skip-webhook-reconcile

Conversation

@alex-w-99

Copy link
Copy Markdown
Contributor

At boot the gateway points the identity's mailbox, phone number, iMessage, and A2A events at whatever URL it just came up on, installing its own webhook subscriptions. That is the right default when the gateway owns its ingress.

It is the wrong default when subscriptions are provisioned ahead of time. There the destination is already fixed, and the API key the gateway runs with may not be permitted to change it — so the write is redundant at best, and at worst the reason boot never completes.

What changed

  • gateway.skipWebhookReconcile, default false, also settable as INKBOX_SKIP_WEBHOOK_RECONCILE through the existing boolEnv resolution.
  • When set, reconcileSubscriptions returns an empty result before reading the identity or listing subscriptions, and logs subscriptions.skipped with the URL it expects deliveries to already reach.

Behavior

Unchanged unless opted in. Unset or unrecognized values fall through to false.

When enabled, the subscriptions must already deliver to this gateway's webhook URL. If they do not, nothing arrives, and the skip log names the URL that was expected.

Testing

  • npm run typecheck — clean.
  • npm test — 818 passed across 67 files.
  • Added to tests/gateway/subscriptions.test.ts: enabling touches no subscriptions (asserted on the mocked list/create never being called), the skip log names the expected URL, and the default still reconciles.

Version bumped to 0.2.10.

At boot the gateway points the identity's mailbox, phone number, iMessage, and
A2A events at whatever URL it just came up on. That is the right default when
the gateway owns its ingress, but not when subscriptions are provisioned ahead
of time: there the destination is already fixed, and the API key may not be
permitted to change it, so the write is redundant at best and fatal to boot at
worst.

Default false, so nothing changes unless a deployment opts in. Settable as
gateway.skipWebhookReconcile or INKBOX_SKIP_WEBHOOK_RECONCILE.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@alex-w-99
alex-w-99 marked this pull request as ready for review August 7, 2026 23:42
@alex-w-99
alex-w-99 merged commit 641c8c9 into main Aug 7, 2026
9 checks passed
@alex-w-99
alex-w-99 deleted the feat/skip-webhook-reconcile branch August 7, 2026 23:43
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