fix(desktop): reuse managed agents on team deploy instead of force-minting - #3646
Open
matthewdcage wants to merge 1 commit into
Open
fix(desktop): reuse managed agents on team deploy instead of force-minting#3646matthewdcage wants to merge 1 commit into
matthewdcage wants to merge 1 commit into
Conversation
…nting Deploy team to channel set forceNewInstance: true for every persona, bypassing findReusablePersonaAgent and minting duplicate Nostr keypairs with the same display name. Remove that flag, skip mint when the persona is already in-channel, and refresh batch deploy context after each attach. Also add draft-update --pubkey for disambiguation, Instance pubkey in the nest AGENTS.md table, and buzz-acp roster refresh when the managed block changes. Fixes block#3639. Related: block#2648, block#2973, block#2423, block#3204, block#2910. Signed-off-by: Matthew Cage <matthew@hydradigital.com.au> Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #3639.
Deploy team to channel always passed
forceNewInstance: truefor every persona, which bypassedfindReusablePersonaAgent()inprovisionChannelManagedAgent()and minted a fresh Nostr keypair on each deploy — even when the same persona was already attached to the channel with a running managed instance.This PR:
forceNewInstance: truefromAddTeamToChannelDialog.tsxso team deploy follows the same reuse path as single-agent deploy.findPersonaAgentInChannel()and short-circuits provisioning when the persona is already in-channel (no mint, no duplicate member attach).buzz agents draft-update --pubkeyfor disambiguation when multiple agents share a display name ([Bug] Renaming or re-adding personal agents can desynchronise identity and break @mentions #2423 mitigation).agents_roster.rs) so the ACP pool picks up managed-agent block changes without restart.AGENTS.mdtable for operator clarity.Root cause (confirmed on
origin/main)Live reproduction (ai-advantage community)
Repeated Deploy team to channel on the same team/channel grew channel bot membership from 12 distinct running instances to ~24 pubkeys with duplicate display names. Manual cleanup via
buzz channels remove-memberfor stale pubkeys restored 12 canonical instances.Related issues
--pubkeydraft-update mitigation includedOut of scope
create_managed_agentbypersona_idTesting
Verified locally on branch
fix/team-deploy-agent-reuse(rebased on latestorigin/main):cargo test -p buzz-cli agent_managementcargo test -p buzz-acp --lib extract_managedcargo clippy -p buzz-cli -p buzz-acp -- -D warningsnode --test desktop/src/features/agents/agentManagement.test.mjscargo test --manifest-path desktop/src-tauri/Cargo.toml nest::testsjust desktop-tauri-fmtManual test plan
buzz agents draft-update --pubkey <hex> --name "…"targets the correct agent when names collide