aKode fase 2b-1: rimossi plugin remoti e share, bundle download, UI usage/crediti/banner/workspace ChatGPT; fix argomenti MCP (inviati vuoti dopo e4209e2) e overlay TUI; test analytics-upload rimossi; test sicurezza MCP adattati
Some checks failed
blocking-ci / Bazel (push) Has been cancelled
blocking-ci / Blob size policy (push) Has been cancelled
blocking-ci / cargo-deny (push) Has been cancelled
blocking-ci / Codespell (push) Has been cancelled
blocking-ci / repo-checks (push) Has been cancelled
blocking-ci / rust-ci (push) Has been cancelled
blocking-ci / sdk (push) Has been cancelled
blocking-ci / CI required (push) Has been cancelled
postmerge-ci / rust-ci-full (push) Has been cancelled
postmerge-ci / v8-canary (push) Has been cancelled
postmerge-ci / Postmerge CI results (push) Has been cancelled

This commit is contained in:
Andrea
2026-11-09 16:24:36 +01:00
parent 0de669e9ce
commit 981745ccc8
190 changed files with 313 additions and 9756 deletions

View File

@@ -760,11 +760,7 @@ async fn reused_elicitation_senders_follow_each_servers_latest_permission_author
config.apps_enabled = true;
let auth = codex_login::CodexAuth::create_dummy_chatgpt_auth_for_testing();
let hosted_server = crate::codex_apps_mcp_server_config(
"https://example.com",
/*apps_mcp_product_sku*/ None,
/*originator*/ None,
);
let hosted_server = crate::mcp::test_http_mcp_server_config("https://example.com");
let mut attached_server = hosted_server.clone();
attached_server.environment_id = "attached".to_string();
let mut catalog = crate::ResolvedMcpCatalog::builder();
@@ -772,9 +768,9 @@ async fn reused_elicitation_senders_follow_each_servers_latest_permission_author
"attached".to_string(),
attached_server,
));
catalog.register(crate::McpServerRegistration::from_hosted_apps(
"host",
/*contribution_order*/ 0,
// A user-configured server on the local environment, which is not attached below.
catalog.register(crate::McpServerRegistration::from_config(
"local".to_string(),
hosted_server,
));
config.mcp_server_catalog = catalog.build();
@@ -785,14 +781,8 @@ async fn reused_elicitation_senders_follow_each_servers_latest_permission_author
codex_utils_path_uri::PathUri::from_host_native_path(std::env::temp_dir()).unwrap(),
);
let sandbox = Arc::new(sandbox);
// Hosted Apps must still use thread permissions when a local environment is attached.
[
("attached".to_string(), Arc::clone(&sandbox)),
(
codex_config::DEFAULT_MCP_SERVER_ENVIRONMENT_ID.to_string(),
sandbox,
),
]
// Unattached local servers keep using thread permissions.
[("attached".to_string(), sandbox)]
};
config.set_server_permissions(&servers, attachment(PermissionProfile::read_only()));
@@ -808,7 +798,7 @@ async fn reused_elicitation_senders_follow_each_servers_latest_permission_author
&ClientMcpExtensions::default(),
);
let hosted = manager.make_sender(
crate::CODEX_APPS_MCP_SERVER_NAME.to_string(),
"local".to_string(),
/*tx_event*/ None,
&ClientMcpExtensions::default(),
);
@@ -853,6 +843,14 @@ async fn reused_elicitation_senders_follow_each_servers_latest_permission_author
ElicitationAction::Decline
);
let mut configured_servers = config.mcp_server_catalog.configured_servers();
configured_servers
.get_mut("local")
.expect("local server should be registered")
.enabled = false;
config.mcp_server_catalog = config
.mcp_server_catalog
.with_materialized_servers(configured_servers);
let servers = crate::effective_mcp_servers(&config, /*auth*/ None);
config.set_server_permissions(&servers, std::iter::empty());
assert!(manager.update(
@@ -879,11 +877,7 @@ fn verification_fixture(
catalog.register(crate::catalog::McpServerRegistration::from_hosted_apps(
"verification-test",
/*contribution_order*/ 0,
crate::mcp::codex_apps_mcp_server_config(
"https://example.com",
/*apps_mcp_product_sku*/ None,
/*originator*/ None,
),
crate::mcp::test_http_mcp_server_config("https://example.com"),
));
Arc::make_mut(&mut config).mcp_server_catalog = catalog.build();
let manager = ElicitationRequestManager::new(
@@ -1072,11 +1066,7 @@ async fn user_verification_rejects_attached_servers_even_if_they_use_the_plugin_
let mut catalog = crate::catalog::ResolvedMcpCatalog::builder();
catalog.register(crate::catalog::McpServerRegistration::from_config(
name.into(),
crate::mcp::codex_apps_mcp_server_config(
"https://example.com",
/*apps_mcp_product_sku*/ None,
/*originator*/ None,
),
crate::mcp::test_http_mcp_server_config("https://example.com"),
));
config.mcp_server_catalog = catalog.build();
}