Skip to content

Use one community-aware source for agent names - #140

Open
loganj wants to merge 3 commits into
mainfrom
feat/agent-name-service
Open

loganj wants to merge 3 commits into
mainfrom
feat/agent-name-service

Conversation

@loganj

@loganj loganj commented Sep 22, 2026

Copy link
Copy Markdown

🤖

Summary

Lay the groundwork for consistent agent names throughout the app in #141. This PR gives those screens one shared way to resolve an identity’s display name, rather than making each screen choose and refresh names separately.

The Profile panel is the first consumer. #141 applies the same service to messages, mentions, and conversation controls; #142 distinguishes agents that share a name.

Details

  • Prefer a native agent name only when its configured community matches the active community; otherwise use saved agent information, then the public profile.
  • Update mounted consumers when names change or the Agents feature is disabled or re-enabled. Disabling it restores public-profile fallback.
  • Names are presentation only. This does not import credentials, start agents, or change identity or access checks.

First of three stacked PRs; base is main, including #136 and #137.

Validation

Service lifecycle, community scope, and Profile panel regression coverage; this branch head typechecks. Existing Buzz-link browser assertions now check the single service-owned library read instead of treating opening a mention as the read trigger. No browser cases added or removed. Hosted JavaScript, Rust/tool integration, Chromium/WebKit journeys, browser measurements, DCO, and security checks passed. Windows native validation was skipped by the workflow.

@loganj
loganj requested review from a team, comp615 and wesbillman as code owners September 22, 2026 18:30

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Carl, an automated reviewer, commenting via Wes’s GitHub account.

Changes requested: one P2 reconnect-recovery gap

Reviewed head ab358b85628608e3ce73c6773c5e402a0fdf201d against base/merge base 298a50a9861c19d33e45b2b52bdadb81b128f15d.

Library-backed configured names can disappear from the Profile panel after an ordinary live reconnect. The new name service does not restore its cleared source; recovery depends on another feature refreshing the library. This affects the first consumer in this PR, not the later #141/#142 migrations. Matching ready native records are unaffected. See the inline finding for reproduction and exit criteria.

Validation: 9 existing focused tests passed across identity-name service, agent directory, ProfilePanel, agent library and app control integration. A separate review-only diagnostic using the production session/provider and mounted React ProfilePanel, synthetic transport callbacks and signed fixture profiles reproduced Configured CarlPublic Carl, with the library idle and its read count still 1 after reconnect. Reopening the panel did not reload it; explicit library refresh restored the configured heading. This diagnostic characterizes the defect, not an acceptance pass. No production files changed.

Both independent review lanes have returned and were integrated. No other material blocker adopted. Applicable hosted CI checks pass; Windows native validation was skipped. No additional local browser/native acceptance run, approval, or merge.

Comment on lines +20 to +22
activate(source) {
void source.agentLibrary.refresh();
void control?.refresh();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P2] Restore the naming inventory after a same-session reconnect

This activation is the only name-service-owned legacy-library read, but it runs only when the provider is selected. The live session clears agentLibrary on connected → retrying (src/features/relay/session.ts:1215–1224) and reconnects without replacing the session/provider. Its established() recovery does not reload this inventory, and bindNames only emits a revision on library changes. For names backed by the legacy library rather than a matching ready native record, the Profile panel therefore falls back to the public name after a normal network interruption and does not recover on reconnect or panel remount.

Reproduced at this head with actual createRelaySession, agentDirectory, signed profile fixtures and mounted ProfilePanel: Configured Carl before reconnect; after connected → retrying → connected + global establishment, Public Carl, library status idle, and read count still 1. Remounting ProfilePanel leaves the same result; explicitly refreshing the library restores Configured Carl. Other mounted features can mask this: mention-bearing references and AgentChoice refresh an idle library. The naming service must not depend on those unrelated consumers being present.

Restore optional name data through the existing reconnect/demand lifecycle while the provider is enabled, preserving clear/abort/disposal boundaries and public fallback while unavailable. Add a same-session reconnect regression that verifies the configured name returns without an unrelated library-refreshing surface. This does not require polling or retaining invalidated data.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed at 000495d. The name provider now owns a library demand handle; provider replacement, disable, and disposal release it. The existing session establishment lifecycle refreshes retained demand after reconnect, without polling, keeping stale inventory, or requiring another surface. Added a mounted ProfilePanel regression using real createRelaySession and signed public-profile data: configured → public fallback on retry → configured after establishment, in the same session. It also checks disabled demand and disposal. Focused lifecycle tests pass; hosted checks are still running.

Larry added 3 commits September 22, 2026 19:52
Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
@loganj
loganj force-pushed the feat/agent-name-service branch from ab358b8 to 000495d Compare September 22, 2026 23:55
@loganj
loganj requested a review from wesbillman September 23, 2026 00:05

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Carl, an automated reviewer, commenting via Wes’s GitHub account.

Re-review: reconnect blocker resolved; no remaining material findings

Reviewed head 000495d3d1eb4b7345cc5bf4b08c6992ccf5a377 against base f66f89e5b8993ee5833cfa377486a0b0ff9911ff. git range-diff confirms the two previously reviewed feature commits are unchanged by the rebase; this follow-up reviews the recovery commit and its integration.

The previous P2 is fixed: the mounted Profile panel automatically regains its configured agent name after a same-session live reconnect, without reopening the panel, visiting another screen, or manually refreshing the library. Provider activation retains library demand, replacement/disable/disposal releases it, and the session's existing reconnect path refreshes only retained demand. No polling or alternate name owner was added.

Validation:

  • 11 focused checks passed at this exact head with production files unchanged: the four complete library/name-service/directory/Profile test files (9 tests), plus two temporary review diagnostics. Replayed the original production-session + mounted React probe as an acceptance test: configured name restored and library ready after reconnect; remount performs no additional library read.
  • The checked-in regression exercises disabled reconnect, re-enable and disposal. A separate held-response diagnostic confirms a late pre-disconnect library result cannot overwrite the recovered inventory, and no-demand/released-demand reconnect performs no read. Independent source review of resource ownership and stale-result fencing found no material regression.
  • Hosted automatic CI is green, including JavaScript, Rust/tool integration, both engines' four browser shards, browser measurements, CI required, DCO and security checks. Broad coverage relies on CI; no duplicate full suite or additional local browser/native acceptance run. Windows native validation is skipped by the workflow.

No remaining material findings in this bounded re-review. Later consumer migrations in #141/#142 and deferred label hardening remain outside this PR's exit criteria. This is a COMMENT review, not approval or permission to merge; it does not itself dismiss the earlier changes-requested review.

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