Skip to content

fix(teams): carry team id and direction on membership_changed - #18

Merged
kipavy merged 1 commit into
mainfrom
fix-236-membership-changed-id
Sep 10, 2026
Merged

fix(teams): carry team id and direction on membership_changed#18
kipavy merged 1 commit into
mainfrom
fix-236-membership-changed-id

Conversation

@kipavy

@kipavy kipavy commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • membership_changed fired 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.
  • Emit membership_changed:added:{team_id} / membership_changed:removed:{team_id} instead, so the client can act on the exact team directly.
  • Split the vault-key-wrap notification into its own vault_key_changed event — recipients are already members when it fires, so it was never a real membership change.
  • Bare membership_changed is 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 build
  • cargo test (357 passed)

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>
@kipavy
kipavy merged commit b941763 into main Sep 10, 2026
2 checks passed
@kipavy
kipavy deleted the fix-236-membership-changed-id branch September 10, 2026 11:02
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.
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