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:
@@ -2,11 +2,10 @@ use codex_utils_absolute_path::test_support::PathExt;
|
||||
use std::time::Duration;
|
||||
|
||||
use anyhow::Result;
|
||||
use app_test_support::ChatGptAuthFixture;
|
||||
use app_test_support::MockResponsesConfig;
|
||||
use app_test_support::TestAppServer;
|
||||
use app_test_support::create_mock_responses_server_repeating_assistant;
|
||||
use app_test_support::write_chatgpt_auth;
|
||||
use app_test_support::write_api_key_auth;
|
||||
#[cfg(unix)]
|
||||
use codex_app_server_protocol::ConfigReadParams;
|
||||
#[cfg(unix)]
|
||||
@@ -45,7 +44,6 @@ use codex_app_server_protocol::TurnStartResponse;
|
||||
use codex_app_server_protocol::UserInput;
|
||||
#[cfg(unix)]
|
||||
use codex_app_server_protocol::WriteStatus;
|
||||
use codex_config::types::AuthCredentialsStoreMode;
|
||||
use codex_protocol::MemoryVersion;
|
||||
use core_test_support::responses;
|
||||
use pretty_assertions::assert_eq;
|
||||
@@ -663,7 +661,6 @@ source = {:?}
|
||||
let request_id = mcp
|
||||
.send_plugin_list_request(PluginListParams {
|
||||
cwds: None,
|
||||
marketplace_kinds: None,
|
||||
force_refetch: false,
|
||||
})
|
||||
.await?;
|
||||
@@ -1306,14 +1303,7 @@ async fn external_agent_config_detects_and_imports_project_memory_files(
|
||||
#[tokio::test]
|
||||
async fn external_agent_config_import_reports_failed_sync_import_in_completion() -> Result<()> {
|
||||
let codex_home = TempDir::new()?;
|
||||
write_chatgpt_auth(
|
||||
codex_home.path(),
|
||||
ChatGptAuthFixture::new("chatgpt-token")
|
||||
.account_id("account-123")
|
||||
.chatgpt_user_id("user-123")
|
||||
.chatgpt_account_id("account-123"),
|
||||
AuthCredentialsStoreMode::File,
|
||||
)?;
|
||||
write_api_key_auth(codex_home.path())?;
|
||||
let source_home = external_agent_home(codex_home.path());
|
||||
std::fs::create_dir_all(&source_home)?;
|
||||
std::fs::write(
|
||||
@@ -1395,14 +1385,7 @@ async fn external_agent_config_import_reports_failed_sync_import_in_completion()
|
||||
async fn external_agent_config_import_reports_missing_session_in_completion() -> Result<()> {
|
||||
let codex_home = TempDir::new()?;
|
||||
std::fs::write(codex_home.path().join("config.toml"), "")?;
|
||||
write_chatgpt_auth(
|
||||
codex_home.path(),
|
||||
ChatGptAuthFixture::new("chatgpt-token")
|
||||
.account_id("account-123")
|
||||
.chatgpt_user_id("user-123")
|
||||
.chatgpt_account_id("account-123"),
|
||||
AuthCredentialsStoreMode::File,
|
||||
)?;
|
||||
write_api_key_auth(codex_home.path())?;
|
||||
|
||||
let missing_session_path =
|
||||
external_agent_home(codex_home.path()).join("projects/repo/missing.jsonl");
|
||||
@@ -1464,14 +1447,7 @@ async fn external_agent_config_import_reports_missing_session_in_completion() ->
|
||||
async fn external_agent_config_import_reports_session_config_error_subtype() -> Result<()> {
|
||||
let codex_home = TempDir::new()?;
|
||||
std::fs::write(codex_home.path().join("config.toml"), "")?;
|
||||
write_chatgpt_auth(
|
||||
codex_home.path(),
|
||||
ChatGptAuthFixture::new("chatgpt-token")
|
||||
.account_id("account-123")
|
||||
.chatgpt_user_id("user-123")
|
||||
.chatgpt_account_id("account-123"),
|
||||
AuthCredentialsStoreMode::File,
|
||||
)?;
|
||||
write_api_key_auth(codex_home.path())?;
|
||||
|
||||
let project_root = codex_home.path().join("repo");
|
||||
let session_dir = external_agent_home(codex_home.path()).join("projects/repo");
|
||||
@@ -1549,14 +1525,7 @@ async fn external_agent_config_import_reports_session_config_error_subtype() ->
|
||||
async fn external_agent_config_import_reinstalls_plugins_from_known_marketplaces() -> Result<()> {
|
||||
let codex_home = TempDir::new()?;
|
||||
std::fs::write(codex_home.path().join("config.toml"), "")?;
|
||||
write_chatgpt_auth(
|
||||
codex_home.path(),
|
||||
ChatGptAuthFixture::new("chatgpt-token")
|
||||
.account_id("account-123")
|
||||
.chatgpt_user_id("user-123")
|
||||
.chatgpt_account_id("account-123"),
|
||||
AuthCredentialsStoreMode::File,
|
||||
)?;
|
||||
write_api_key_auth(codex_home.path())?;
|
||||
let marketplace_root = codex_home.path().join("marketplace");
|
||||
let plugin_root = marketplace_root.join("plugins").join("sample");
|
||||
std::fs::create_dir_all(marketplace_root.join(".agents/plugins"))?;
|
||||
@@ -1691,7 +1660,6 @@ async fn external_agent_config_import_reinstalls_plugins_from_known_marketplaces
|
||||
let request_id = mcp
|
||||
.send_plugin_list_request(PluginListParams {
|
||||
cwds: None,
|
||||
marketplace_kinds: None,
|
||||
force_refetch: false,
|
||||
})
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user