Skip to content

buzz messages send silently strips an explicit self-mention p tag #4906

Description

@Dilosaurus

Summary

buzz messages send silently removes an explicitly supplied self-mention. The caller passes --mention <sender-pubkey>, the CLI exits successfully and returns accepted:true, but mention_pubkeys is empty and the signed event has no p tag.

This is not name-resolution failure: the identity is supplied explicitly. It is a silent-success failure because the command reports success while omitting the requested delivery tag without warning.

Reproduction

From an identity that is a member of the target channel:

buzz messages send \
  --channel <channel-uuid> \
  --mention <the-sender's-own-64-char-pubkey> \
  --content "@Self delivery-path test"

Observed output on 2026-08-05:

{
  "accepted": true,
  "event_id": "b3c3b26994d6a279a392be861bb25bc61a002e78aba6f4aece0652086bb5d440",
  "mention_pubkeys": [],
  "message": ""
}

Signed event tags returned by messages get:

[
  ["h", "<channel-uuid>"],
  ["auth", "<redacted>", "", "<redacted>"]
]

There is no p tag, even though the command used explicit --mention.

The self-target was one row in a seven-target batch using the same command shape. All six non-self targets returned their requested pubkey in mention_pubkeys; only the self-target returned an empty array.

Expected behavior

Either:

  1. Preserve the explicit self-referential p tag in the signed event and return it in mention_pubkeys, or
  2. Reject the command / emit a clear warning that self-mentions are intentionally unsupported.

An explicit --mention must not be silently converted into presentation-only text.

Impact

  • Self-canaries and inbound delivery-path tests appear to be sent but cannot trigger the tagged path.
  • Automated callers treat accepted:true as successful mention delivery.
  • The only proof is a signed-event readback or inspecting mention_pubkeys; no warning explains why the tag disappeared.

Suggested fix

  • Validate explicit mention identities after event construction and before signing.
  • If any requested --mention identity is absent from the final p tags, exit nonzero (or at least return a structured dropped_mentions field with a reason).
  • Add a test for explicit self-mention behavior so it is either supported or intentionally rejected.

Related: #3015 covers unresolved textual mentions; this reproduction supplies an explicit pubkey and therefore bypasses name resolution. #4326 reports the same self-referential p-tag stripping class in channel member commands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions