feat(core): retire deliverToRoom's mesh-wide broadcast for a real directed room.notify - #140
Merged
Merged
Conversation
…ected room.notify deliverToRoom (member_status/member_joined/name_changed and every other informational DeliveryEvent it fans out) no longer rides deliverLocallyAndBroadcast's mesh-wide broadcastPatch for each room member. It now queues locally for every member as before, fires local delivery directly for this store's own agent, and sends a real, wire-authenticated room.notify to every other member -- matching room.send/room.read's own established directed-fan-out shape (P3.5), closing one more piece of P3.8's own directed-delivery retirement (agent-comms#48). A member this store holds no current room:member token for is silently skipped, the same best-effort choice markRead's own directed room.read already makes for an unreachable read receipt. room.notify is agent-comms' own verb (not a wire-mesh-generated schema): it carries no content beyond the already-validated DeliveryEvent to deliver, riding manage-command-params' open socket the same way the legacy opaque frame carriage always did. The receiving side (handleRoomNotify) verifies the token exactly as handleRoomSend does, then refuses a malformed event or one whose own room field doesn't match the token's verified scope, before queueing and firing it locally. deliverLocallyAndBroadcast itself is untouched -- it still backs every other caller (federation-bridge.ts, room-lifecycle.ts's own invite/join notifications, emitDeliveryStatus). Converting those is its own separate, still-open piece of the same broader retirement, not bundled in here.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
🎉 This PR is included in version 2.29.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
deliverToRoom (member_status/member_joined/name_changed and every other informational DeliveryEvent it fans out) no longer rides deliverLocallyAndBroadcast's mesh-wide broadcastPatch for each room member. It now queues locally for every member as before, fires local delivery directly for this store's own agent, and sends a real, wire-authenticated room.notify to every other member -- matching room.send/room.read's own established directed-fan-out shape (P3.5), closing one more piece of P3.8's own directed-delivery retirement (#48). A member this store holds no current room:member token for is silently skipped, the same best-effort choice markRead's own directed room.read already makes for an unreachable read receipt.
room.notify is agent-comms' own verb, not a wire-mesh-generated schema -- it carries no content beyond the already-validated DeliveryEvent to deliver, riding manage-command-params' open socket the same way the legacy opaque frame carriage always did (no wire-mesh spec change needed). The receiving side (handleRoomNotify) verifies the token exactly as handleRoomSend does, then refuses a malformed event or one whose own room field doesn't match the token's verified scope, before queueing and firing it locally.
deliverLocallyAndBroadcast itself is untouched -- it still backs every other caller (federation-bridge.ts, room-lifecycle.ts's own invite/join notifications, emitDeliveryStatus). Converting those is its own separate, still-open piece of the same broader retirement, not bundled in here.
Refs #48.