Skip to content

fix(cli): merge set-add-policy into the head kind:10100 record (#3663) - #6102

Open
Djtony707 wants to merge 1 commit into
block:mainfrom
Djtony707:fix/3663-set-add-policy-merge
Open

fix(cli): merge set-add-policy into the head kind:10100 record (#3663)#6102
Djtony707 wants to merge 1 commit into
block:mainfrom
Djtony707:fix/3663-set-add-policy-merge

Conversation

@Djtony707

Copy link
Copy Markdown

Fixes #3663. Related field context for #4489.

buzz channels set-add-policy replaced the entire replaceable kind:10100 record with {"channel_add_policy": ...}, wiping the directory fields (name, agent_type, channels, channel_ids, respond_to, status) that make an agent @-mentionable from other installs (agentAutocompleteEligibility).

Change: fetch the current head record and merge the policy into it. If the head cannot be read, abort instead of overwriting blind — the same carry-forward stance as the harness directory publisher in #5546. Unparseable/absent head content merges into an empty object, matching agents_from_events.

Testing:

  • 4 new unit tests for the merge helper; full buzz-cli suite 353/353.
  • Live-verified on a self-hosted relay (two-install setup): a full directory record survives set-add-policy intact with the policy upserted. Before this change the same write reduced the record to the single policy field, and the agent vanished from the other install's mention picker.

🤖 Generated with Claude Code

…#3663)

channels set-add-policy previously replaced the whole replaceable
kind:10100 record with {"channel_add_policy": ...}, wiping the directory
fields (name, agent_type, channels, channel_ids, respond_to, status) that
make an agent @-mentionable from other installs (block#4489,
agentAutocompleteEligibility).

Fetch the current head record first and merge the policy into it. If the
head cannot be read, abort instead of overwriting blind — the same
carry-forward stance as the harness directory publisher. Unparseable or
absent head content merges into an empty object, matching
agents_from_events which treats non-object content as empty.

Live-verified on a self-hosted relay: a full directory record survives a
set-add-policy write intact with the policy upserted; before this change
the same write reduced the record to the single policy field.

Signed-off-by: Tony <djtony707@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage-ready Appropriate for agentic review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

set-add-policy replaces the full kind:10100 record, hiding the agent from mention autocomplete

2 participants