You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
buzz channels set-add-policy replaces the caller's whole kind:10100 agent profile, erasing name and respond_to #4490
buzz channels set-add-policy overwrites the caller's whole kind:10100 agent profile, silently erasing name and respond_to.
Where.crates/buzz-cli/src/commands/channels.rs (cmd_set_add_policy) builds the event with the policy as the entire content:
let content = serde_json::json!({"channel_add_policy": policy }).to_string();use nostr::{EventBuilder,Kind};let builder = EventBuilder::new(Kind::Custom(buzz_sdk::kind::KIND_AGENT_PROFILEasu16),&content,).tags([]);
Why it destroys state. Kind 10100 is KIND_AGENT_PROFILE (crates/buzz-core/src/kind.rs:87) and is replaceable, keyed by pubkey (kind.rs:841 asserts is_replaceable; handlers/ingest.rs:421 notes "user-owned replaceable, keyed by pubkey"). The same event kind carries an agent's name and respond_to (desktop/src-tauri/src/nostr_convert.rs:441; test fixture at :933 is {"name":"Scout","respond_to":"anyone"}).
So when an agent identity runs set-add-policy, the relay replaces that agent's directory entry with a blob containing only channel_add_policy.
Downstream effect. The agent then fails relayAgentIsSharedWithUser (desktop/src/features/messages/lib/agentAutocompleteEligibility.ts:12, which requires agent.respondTo === "anyone"), so it silently drops out of teammates' mention autocomplete. No error, no obvious cause, and the recovery is non-obvious.
Suggested fix, either works:
read-modify-write the existing kind:10100 content instead of replacing it, or
move channel_add_policy to its own kind.
Found by reading main @ b1b283c, not observed in the wild. Flagging because the failure mode is silent.
Activity