Identity-owned webhook subscriptions with safe reconciliation - #75
Closed
dimavrem22 wants to merge 3 commits into
Closed
dimavrem22 wants to merge 3 commits into
dimavrem22 wants to merge 3 commits into
Conversation
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.
Executive Summary
Deferred for now. Existing separate webhook subscriptions remain supported; this optional mixed-event reconciliation upgrade is not required for current installations. The branch is retained so this work can be reopened later.
Make Claude Code notification subscriptions identity-owned, independent of channel provisioning, and safe to reconcile alongside existing receivers.
Description
Startup creates one mixed subscription for the receiver's existing event set. Compatible legacy rows and event supersets are preserved; missing events are added with a revision precondition, with bounded rereads after conflicts. Incoming-call routing remains separate.
Capacity errors now stop immediately with actionable migration guidance instead of retrying as revision conflicts. URL changes are explicitly documented as a manual transition: a matching path on another host does not prove ownership, so different destinations are never automatically repointed or deleted.
Reason
Channel provisioning should not dictate webhook ownership, and gateway restarts must not overwrite independently configured events, context, credentials, or destinations.
Decisions
Testing
The full offline suite passed with the actual rebuilt SDK 0.7.1 wheel installed: 587 passed. Changed-source Ruff and
uv lock --checkpassed. Full-repository Ruff reports one unchangedtests/test_bootstrap.pyissue, verified identical onmain. These runs include the setup, reconciliation, and review-fix regressions.Coverage includes no-channel creation, superset and legacy coverage preservation, concurrent edit/create recovery, context/authentication ambiguity, unrelated destination isolation, distinct capacity errors, and bounded retries. No live channel tests, package publication, or deployment were performed.
Release dependency
Depends on SDK identity webhook support and an API supporting mixed identity subscriptions, resolved legacy-owner listing, and revision-checked mutations. Publish the exact SDK 0.7.1 artifact before registry-based installs or dependent registry CI. This PR remains draft so live-stack workflows do not run.
The uv source and lockfile pin the immutable SDK Git revision and install without waiting for PyPI. Ordinary pip installs still require publication.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Rebased SDK dependency
SDK 0.7.0 shipped from
mainwhile this stack was under review, so the identity-webhook release is now 0.7.1. Dependency pins, setup minimums, and installation guidance now require 0.7.1; SDK contact-call compatibility was checked and the full suite above rerun. Registry-based CI remains release-gated until that exact SDK is published. No test-skipping or workflow bypass was added.