Skip to content

fix(desktop): dedupe personas backed by remote agents - #7465

Open
ignacioarsuaga wants to merge 2 commits into
block:mainfrom
ignacioarsuaga:fix/second-device-mention-persona
Open

ignacioarsuaga wants to merge 2 commits into
block:mainfrom
ignacioarsuaga:fix/second-device-mention-persona

Conversation

@ignacioarsuaga

Copy link
Copy Markdown

Summary

On a second Desktop, mention autocomplete no longer offers a mintable persona when an owned relay-discovered agent already uses that persona. This prevents the duplicate row from creating a second same-name agent while preserving personas whose only matching relay agent belongs to another owner.

The relay directory now carries the authenticated kind:30177 persona_id through Tauri. The picker trusts that link only when the policy owner matches the signed-in user.

Related issue

Addresses #3414.

Related to #7320. This is a focused fix for the mention picker and does not change the key lifecycle, deletion, or backfill behavior covered by #3441.

Testing

  • just ci
  • Added a second-Desktop unit case: owned relay agent with persona P + active persona P + empty local managed-agent store produces one identity candidate with personaId P.
  • Added a cross-owner collision case so a foreign agent cannot hide a local persona.
  • Verified the managed-policy conversion projects persona_id only from an owner-authenticated kind:30177 record.

The original behavior was reproduced on Buzz Desktop 0.5.23 for Linux: the picker showed the real channel member and a second same-name agent · not in channel row. Selecting the real row produced one p tag for the existing agent; the extra row remained available to mint a duplicate.

Signed-off-by: Codex Hall <iarsuaga+codex@citizengo.net>
@ignacioarsuaga
ignacioarsuaga requested a review from a team as a code owner September 7, 2026 22:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-07T22:14:51.031633Z 371c608 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 3c7f288c60d67df78577b237e27c3dfc8831aaa1...a83ead2479f74e9d1d66a478764eb3846cae327e.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review a83ead2479f74e9d1d66a478764eb3846cae327e to authorize a new review.
Any previous review applies only to its recorded range.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 371c6086bc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/messages/lib/buildMentionCandidates.ts Outdated
Comment thread desktop/src-tauri/src/managed_agents/types.rs
Signed-off-by: Codex Hall <iarsuaga+codex@citizengo.net>
@coreyone

coreyone commented Sep 8, 2026

Copy link
Copy Markdown

Support. This matches the duplicate mention-search case: one owner-authenticated relay agent and one local persona appear as separate rows. Linking persona_id through the verified managed-agent policy removes only duplicate owned personas while preserving foreign same-name identities. Equivalent local patch passes 73 Rust conversion tests, focused mention tests, TypeScript, Biome, and formatting checks.

mfethe1 added a commit to mfethe1/buzz that referenced this pull request Sep 10, 2026
…ia relay presence

The kind:10100 agent directory carries a replaceable, unexpiring status, so a
crashed relay agent advertises 'online' forever and wins the mentionRanking
active boost. REG-27 collapses two independent liveness predicates into one
decision point (isRelayAgentActive) and joins the TTL'd relay presence the rest
of the desktop already consumes (useAgentAvailabilityLookup). Presence is
authority only when the read succeeded; undefined availability falls back to
the directory so a relay blip cannot empty the mention picker. Managed-agent
running/deployed classification untouched.

Validation run 98 (2026-09-10, Gate-2 under owner-resolved analyzer ceiling 7):
targeted 19/19; typecheck + 6 check:* guards rc=0; full desktop suite failure
name-set identical to baseline (1 known provenance-cache failure both trees);
flutter analyze 7 vs 7 identical signatures; mobile flutter-test name-set diff
empty vs baseline; cargo buzz-db/core/acp/relay --lib failure name-sets match
known_baseline_failures. DCO: 5aa17e3 gap closed by re-adding the commit at
integration with Signed-off-by: Michael Feth (cc20732), original authorship
preserved. No upstream PR opened (rival block#7465 open on buildMentionCandidates;
external posting needs approval).
Evidence: registry/work/REG-27/verifying.md + digests/2026-09-10-integration-run98.md
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.

2 participants