Skip to content

fix(relay): emit participant-addressed DM discovery - #3690

Open
ScaleLeanChris wants to merge 1 commit into
block:mainfrom
ScaleLeanChris:codex/fix-dm-discovery
Open

fix(relay): emit participant-addressed DM discovery#3690
ScaleLeanChris wants to merge 1 commit into
block:mainfrom
ScaleLeanChris:codex/fix-dm-discovery

Conversation

@ScaleLeanChris

@ScaleLeanChris ScaleLeanChris commented Jul 30, 2026

Copy link
Copy Markdown

Summary

  • emit the relay-confirmed kind:41001 event that buzz dms list already queries
  • add d and h channel tags plus a p tag for every DM participant
  • keep the event channel-scoped so the existing private-channel read gate applies
  • emit on both create and re-open so older DMs self-heal
  • emit from the add-member path that creates immutable group DMs
  • use the channel creation timestamp so repeated opens produce one stable event id

Root cause

The CLI discovery contract existed, but the relay had no kind:41001 producer. The relay emitted kind:39000 channel metadata and membership notifications, so the conversation appeared in buzz channels list while buzz dms list always returned an empty result.

Verification

  • extended the existing real-relay DM discovery test to query kind:41001 as both the creator and recipient
  • adds a third identity through kind:41011 and proves the resulting group DM is discoverable by its new participant
  • asserts all participant p tags, the d and h channel tags, and one event after a recipient re-open
  • cargo fmt --all
  • git diff --check
  • fork CI: Rust lint, unit tests, security, Windows, both Linux cross-compiles, Backend Integration, and the full Relay E2E suite pass

The fork-only macOS desktop build fails before compiling Buzz because its mesh-llm checkout is unavailable. The same environment failure occurs on the unchanged mobile test branch and is unrelated to this relay diff.

Fixes #2897

The relay already knows every participant, so DM discovery should not end as “Return to Sender.”

@ScaleLeanChris
ScaleLeanChris force-pushed the codex/fix-dm-discovery branch from af039a2 to bbfa097 Compare July 30, 2026 05:54
Signed-off-by: ScaleLeanChris <chris@scalelean.com>
@ScaleLeanChris
ScaleLeanChris force-pushed the codex/fix-dm-discovery branch from bbfa097 to ab244a1 Compare July 30, 2026 06:17
@ScaleLeanChris
ScaleLeanChris marked this pull request as ready for review July 30, 2026 06:43
@ScaleLeanChris
ScaleLeanChris requested a review from a team as a code owner July 30, 2026 06:43
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.

buzz dms list returns [] for an active DM participant (recipient can't discover the conversation)

1 participant