aKode fase 2b-2: rimosso login ChatGPT e tutti i sottosistemi solo-ChatGPT
- Login: resta solo chiave API (+ header, Bedrock). Rimossi OAuth/browser, device code, refresh/revoke su auth.openai.com, PAT, agent/workload identity, runtime agent instance, backend-client e openapi-models, workspace routing. - Rimossi: generazione immagini (ext + skill imagegen), history notes, plugin remoti (catalogo, sync, share), cyber access program, daybreak, cloud config e requirements (config_server ora fail-closed), attestation, frozen cloud skills, EMA MCP auth, Codex Apps/connettori, ricerca ospitata, header/zstd/ routing/cookie del backend Codex, fallback OPENAI_API_KEY del realtime. - Messaggi d'errore senza link a chatgpt.com. - Chiavi di config legacy accettate e ignorate; feature rimosse = Stage::Removed. - Test: cancellati solo quelli del codice rimosso; test di sicurezza (sandbox estensioni, permessi, redazione, auth storage, requirements) adattati. Restano solo fallimenti d'ambiente (code-mode-host/V8, ~/.agents). - Istruzioni di sistema invariate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
use super::mcp_resource::ResourceTestEnvironment;
|
||||
use super::mcp_resource::start_resource_test_app_server;
|
||||
use std::borrow::Cow;
|
||||
use std::collections::BTreeMap;
|
||||
use std::collections::BTreeSet;
|
||||
@@ -38,7 +36,6 @@ use codex_protocol::config_types::TrustLevel;
|
||||
use codex_rmcp_client::McpOAuthCallbackMode;
|
||||
use codex_rmcp_client::resolve_mcp_oauth_callback_url;
|
||||
use codex_utils_absolute_path::AbsolutePathBuf;
|
||||
use core_test_support::apps_test_server::AppsTestServer;
|
||||
use core_test_support::skip_if_remote;
|
||||
use core_test_support::stdio_server_bin;
|
||||
use pretty_assertions::assert_eq;
|
||||
@@ -66,11 +63,9 @@ use tokio::task::JoinHandle;
|
||||
use tokio::time::sleep;
|
||||
use tokio::time::timeout;
|
||||
use url::Url;
|
||||
use wiremock::Match;
|
||||
use wiremock::Mock;
|
||||
use wiremock::MockServer;
|
||||
use wiremock::ResponseTemplate;
|
||||
use wiremock::matchers::body_partial_json;
|
||||
use wiremock::matchers::header;
|
||||
use wiremock::matchers::method;
|
||||
use wiremock::matchers::path;
|
||||
@@ -174,58 +169,6 @@ async fn mcp_server_status_list_reuses_thread_connection() -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test_case(false; "standalone")]
|
||||
#[test_case(true; "thread runtime")]
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn full_mcp_server_status_skips_codex_apps_resource_templates(
|
||||
thread_runtime: bool,
|
||||
) -> Result<()> {
|
||||
let server = MockServer::start().await;
|
||||
let apps = AppsTestServer::mount(&server).await?;
|
||||
let (_home, mut app_server) = start_resource_test_app_server(
|
||||
&apps.chatgpt_base_url,
|
||||
&server.uri(),
|
||||
ResourceTestEnvironment::Auto,
|
||||
)
|
||||
.await?;
|
||||
let thread_id = if thread_runtime {
|
||||
Some(
|
||||
app_server
|
||||
.start_thread(ThreadStartParams::default())
|
||||
.await?
|
||||
.thread
|
||||
.id,
|
||||
)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let response: ListMcpServerStatusResponse = app_server
|
||||
.request(|request_id| ClientRequest::McpServerStatusList {
|
||||
request_id,
|
||||
params: ListMcpServerStatusParams {
|
||||
cursor: None,
|
||||
limit: None,
|
||||
detail: Some(McpServerStatusDetail::Full),
|
||||
thread_id,
|
||||
server_name: Some("codex_apps".to_string()),
|
||||
},
|
||||
})
|
||||
.await?;
|
||||
let [status] = response.data.as_slice() else {
|
||||
anyhow::bail!("expected the selected Apps server in the full inventory");
|
||||
};
|
||||
assert_eq!(status.name, "codex_apps");
|
||||
assert!(status.resource_templates.is_empty());
|
||||
let requests = server.received_requests().await.expect("recorded requests");
|
||||
let was_requested = |method: &str| {
|
||||
let matcher = body_partial_json(json!({ "method": method }));
|
||||
requests.iter().any(|request| matcher.matches(request))
|
||||
};
|
||||
assert!(was_requested("resources/list"));
|
||||
assert!(!was_requested("resources/templates/list"));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test_case(false, None, None, None, None, true; "legacy callback")]
|
||||
#[test_case(
|
||||
false,
|
||||
@@ -813,8 +756,6 @@ async fn mcp_server_status_list_returns_raw_server_and_tool_names(plugin: bool)
|
||||
let request_id = mcp
|
||||
.send_plugin_install_request(PluginInstallParams {
|
||||
marketplace_path: Some(AbsolutePathBuf::try_from(marketplace_path)?),
|
||||
remote_marketplace_name: None,
|
||||
install_attempt_id: None,
|
||||
plugin_name: "sample".to_string(),
|
||||
})
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user