Add skipWebhookReconcile for pre-provisioned subscriptions - #25
Merged
Conversation
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>
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.
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, defaultfalse, also settable asINKBOX_SKIP_WEBHOOK_RECONCILEthrough the existingboolEnvresolution.reconcileSubscriptionsreturns an empty result before reading the identity or listing subscriptions, and logssubscriptions.skippedwith 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.tests/gateway/subscriptions.test.ts: enabling touches no subscriptions (asserted on the mockedlist/createnever being called), the skip log names the expected URL, and the default still reconciles.Version bumped to 0.2.10.