fix(teams): carry team id and direction on membership_changed - #18
Merged
Conversation
membership_changed fired bare, so every recipient had to re-fetch and
diff its whole team list (with a 3x retry/backoff) just to learn which
team changed and which way. Emit membership_changed:added:{team_id} /
membership_changed:removed:{team_id} instead, and split the vault-key-wrap
notification (recipients are already members, so it was never a real
membership change) into its own vault_key_changed event.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 tasks
kipavy
added a commit
that referenced
this pull request
Sep 10, 2026
membership_changed fired bare, so every recipient had to re-fetch and
diff its whole team list (with a 3x retry/backoff) just to learn which
team changed and which way. Emit membership_changed:added:{team_id} /
membership_changed:removed:{team_id} instead, and split the vault-key-wrap
notification (recipients are already members, so it was never a real
membership change) into its own vault_key_changed event.
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.
Summary
membership_changedfired bare, so every client had to re-fetch its whole team list and diff it (with a 3x retry/backoff) just to learn which team changed and which way — see membership_changed carries no team id, so every client re-fetches and diffs its whole team list voltius#236.membership_changed:added:{team_id}/membership_changed:removed:{team_id}instead, so the client can act on the exact team directly.vault_key_changedevent — recipients are already members when it fires, so it was never a real membership change.membership_changedis still emitted nowhere new, but is documented as a compat path for the client during rollout overlap (client PR falls back to it for an older server pod).Test plan
cargo buildcargo test(357 passed)