Skip to content

feat(core): retire deliverToRoom's mesh-wide broadcast for a real directed room.notify - #140

Merged
Mearman merged 1 commit into
mainfrom
feat/directed-room-notify
Sep 16, 2026
Merged

Mearman merged 1 commit into
mainfrom
feat/directed-room-notify

Conversation

@Mearman

@Mearman Mearman commented Sep 16, 2026

Copy link
Copy Markdown
Member

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.

…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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-09-16T04:06:03.839881Z 789d438 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Mearman
Mearman merged commit 7c0a606 into main Sep 16, 2026
6 checks passed
@Mearman
Mearman deleted the feat/directed-room-notify branch September 16, 2026 04:06
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.29.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant