From a2ccaa67a35e3af0434dbb9f3a13f51aafee5b43 Mon Sep 17 00:00:00 2001 From: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 Date: Tue, 14 Jul 2026 17:28:14 -0400 Subject: [PATCH] fix(desktop): repair MCP team rebase integration The team snapshot refactor introduced constructors after the MCP layer, and the team argument was added to spawn hashes. Keep local MCP configuration absent from imported shared snapshots while preserving regression coverage. Co-authored-by: Will Pfleger Signed-off-by: Will Pfleger --- desktop/src-tauri/src/commands/team_snapshot.rs | 3 +++ desktop/src-tauri/src/commands/team_snapshot/tests.rs | 3 +++ desktop/src-tauri/src/managed_agents/spawn_hash/tests.rs | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/desktop/src-tauri/src/commands/team_snapshot.rs b/desktop/src-tauri/src/commands/team_snapshot.rs index c42ceb057e..f7fb383e17 100644 --- a/desktop/src-tauri/src/commands/team_snapshot.rs +++ b/desktop/src-tauri/src/commands/team_snapshot.rs @@ -573,6 +573,9 @@ pub async fn confirm_team_snapshot_import( provider: member.definition.provider.clone(), persona_source_version: None, env_vars: std::collections::BTreeMap::new(), + // MCP configuration is local-only, never part of a shared team snapshot. + // Imported instances therefore inherit no local override. + mcp_servers: Vec::new(), start_on_app_launch: false, auto_restart_on_config_change: true, runtime_pid: None, diff --git a/desktop/src-tauri/src/commands/team_snapshot/tests.rs b/desktop/src-tauri/src/commands/team_snapshot/tests.rs index d7d2c39c39..039119a12c 100644 --- a/desktop/src-tauri/src/commands/team_snapshot/tests.rs +++ b/desktop/src-tauri/src/commands/team_snapshot/tests.rs @@ -150,6 +150,7 @@ fn team_export_with_instance_and_memory_level_uses_supplied_entries() { source_team: None, source_team_persona_slug: None, env_vars: Default::default(), + mcp_servers: vec![], respond_to: None, respond_to_allowlist: vec![], parallelism: None, @@ -196,6 +197,7 @@ fn team_export_with_instance_and_memory_level_uses_supplied_entries() { provider: None, persona_source_version: None, env_vars: Default::default(), + mcp_servers: vec![], start_on_app_launch: false, auto_restart_on_config_change: true, runtime_pid: None, @@ -317,6 +319,7 @@ fn team_import_definitions_are_built_for_all_members() { definition.id.len() == 36 && definition.source_team.is_none() && definition.env_vars.is_empty() + && definition.mcp_servers.is_empty() && definition.respond_to_allowlist.is_empty() })); assert_eq!(definitions[0].system_prompt, "Alice prompt"); diff --git a/desktop/src-tauri/src/managed_agents/spawn_hash/tests.rs b/desktop/src-tauri/src/managed_agents/spawn_hash/tests.rs index 342ef05f75..ebe52f8220 100644 --- a/desktop/src-tauri/src/managed_agents/spawn_hash/tests.rs +++ b/desktop/src-tauri/src/managed_agents/spawn_hash/tests.rs @@ -152,12 +152,14 @@ fn buzz_agent_mcp_edit_changes_hash_but_other_runtime_ignores_it() { spawn_config_hash( &buzz_agent, &[], + &[], "wss://ws.example", &GlobalAgentConfig::default() ), spawn_config_hash( &edited, &[], + &[], "wss://ws.example", &GlobalAgentConfig::default() ) @@ -171,12 +173,14 @@ fn buzz_agent_mcp_edit_changes_hash_but_other_runtime_ignores_it() { spawn_config_hash( &goose, &[], + &[], "wss://ws.example", &GlobalAgentConfig::default() ), spawn_config_hash( &goose_edited, &[], + &[], "wss://ws.example", &GlobalAgentConfig::default() ) @@ -196,12 +200,14 @@ fn definition_mcp_edit_changes_buzz_agent_hash_without_becoming_agent_override() spawn_config_hash( &record, &[persona], + &[], "wss://ws.example", &GlobalAgentConfig::default() ), spawn_config_hash( &record, &[edited_persona], + &[], "wss://ws.example", &GlobalAgentConfig::default() )