buzz
buzz copied to clipboard
fix(cli): warn on unresolved @mentions in messages send
Summary
Fixes #3015.
buzz messages send dropped @name tokens that did not resolve against the channel member list with exit 0 and no stderr signal. Agents could not tell a successful mention from a silent miss.
Changes
- Partition extracted
@tokens into resolved pubkeys vs unresolved names - Non-strict (default): emit greppable stderr warnings per unresolved token; still send
--strict-mentions: fail with exit 1 and a single JSONUsageerror (no plaintext mixed in)- Transport failures during membership/profile lookup are preserved under strict mode (exit 2 / retryable), not mislabeled as unresolved names
- Non-strict lookup failure: send without auto
ptags + one warning (mention lookup failed...) - Mention resolution runs before file uploads so strict validation cannot orphan Blossom media
Channel-scoped resolution (kind 39002 members only) is unchanged.
Test plan
- [x]
cargo test -p buzz-cli --lib commands::messages::tests(23 passed) - [ ] Manual: mixed resolved/unresolved
@names → warning(s), exit 0, only resolvedptags - [ ] Manual:
--strict-mentionswith unresolved name → exit 1, single JSON error on stderr, no event - [ ] Manual:
--strict-mentionswhen relay/queryis down → exit 2 (not Usage)
Pre-review
Reviewed on fork: https://github.com/tynamite/buzz/pull/1
- Codex: clean on tip (after addressing 3 P2s)
- Local Antigravity pass 2: approve
Related
- Claim: https://github.com/block/buzz/issues/3015#issuecomment-5085717294