WIP fase 2b-2: rimosso login ChatGPT/OAuth/device code, agent/workload identity, backend-client; resta solo chiave API (test non tutti verdi)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-10 06:00:44 +01:00
parent 82347a58ed
commit 231e8cd136
661 changed files with 4924 additions and 64817 deletions

View File

@@ -1,6 +1,5 @@
use anyhow::Context;
use anyhow::Result;
use app_test_support::ChatGptAuthFixture;
use app_test_support::MockResponsesConfig;
use app_test_support::TestAppServer;
use app_test_support::create_apply_patch_sse_response;
@@ -12,7 +11,7 @@ use app_test_support::create_mock_responses_server_repeating_assistant;
use app_test_support::create_mock_responses_server_sequence;
use app_test_support::create_mock_responses_server_sequence_unchecked;
use app_test_support::format_with_current_shell_display;
use app_test_support::write_chatgpt_auth;
use app_test_support::write_api_key_auth;
use app_test_support::write_mock_responses_config_toml_with_chatgpt_base_url;
use app_test_support::write_models_cache;
use app_test_support::write_models_cache_with_models;
@@ -76,7 +75,6 @@ use codex_app_server_protocol::WarningNotification;
use codex_core::test_support::all_model_presets;
use codex_exec_server::LOCAL_ENVIRONMENT_ID;
use codex_features::Feature;
use codex_login::AuthCredentialsStoreMode;
use codex_models_manager::model_info::model_info_from_slug;
use codex_protocol::config_types::CollaborationMode;
use codex_protocol::config_types::ModeKind;
@@ -409,15 +407,7 @@ async fn tool_call_metadata_stays_out_of_raw_response_item_notifications() -> Re
.enable_feature(Feature::Apps)
.enable_feature(Feature::ExecutedToolCallMetadata)
.write(codex_home.path())?;
write_chatgpt_auth(
codex_home.path(),
ChatGptAuthFixture::new("chatgpt-test-token")
.account_id("account-123")
.chatgpt_account_id("account-123")
.chatgpt_user_id("user-123")
.email("employee@openai.com"),
AuthCredentialsStoreMode::File,
)?;
write_api_key_auth(codex_home.path())?;
let mut mcp = TestAppServer::builder()
.with_codex_home(codex_home.path())
@@ -658,11 +648,7 @@ async fn turn_start_steers_active_turn_and_returns_active_turn_id() -> Result<()
server.uri()
),
)?;
write_chatgpt_auth(
codex_home.path(),
ChatGptAuthFixture::new("chatgpt-test-token").plan_type("pro"),
AuthCredentialsStoreMode::File,
)?;
write_api_key_auth(codex_home.path())?;
let mut mcp = TestAppServer::builder()
.with_codex_home(codex_home.path())
.without_managed_config()