Add INKBOX_SKIP_WEBHOOK_RECONCILE for pre-provisioned subscriptions - #43
Merged
Conversation
On start the bridge points the identity's mailbox, phone number, and iMessage events at whatever URL it just came up on. That is the right default when the bridge 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 startup at worst. Default false, so nothing changes unless a deployment opts in. 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.
On start the bridge points the identity's mailbox, phone number, and iMessage events at whatever URL it just came up on, installing its own webhook subscriptions. That is the right default when the bridge 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 bridge runs with may not be permitted to change it — so the write is redundant at best, and at worst the reason startup never completes.
What changed
INKBOX_SKIP_WEBHOOK_RECONCILE, defaultfalse, resolved through the existingenv_flaghelper and carried onBridgeConfigasskip_webhook_reconcile._patch_identity_objectsreturns early and logs the URL it expects deliveries to already be pointed at.Behavior
Unchanged unless opted in. Unset, empty, or unrecognized values all leave reconciliation on.
When enabled, the subscriptions must already deliver to this bridge's webhook URL. If they do not, nothing arrives, and the log line names the URL that was expected.
Testing
pytest tests/— 468 passed, 23 skipped.tests/test_gateway_skip_webhook_reconcile.py: skipping performs no API calls (the fake raises on any subscription call or identity read), not skipping still reconciles, the default config reconciles, and the truthy/falsy spellings resolve as documented.Version bumped to 0.2.10 and the environment table updated.