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:
@@ -1034,7 +1034,7 @@ async fn reasoning_effort_override_remote_v2_compaction_resets_pinned_effort(
|
||||
.await;
|
||||
|
||||
let test = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_auth(CodexAuth::from_api_key("Test API Key"))
|
||||
.with_model_info_override("gpt-5.4", |model| {
|
||||
model.use_responses_lite = true;
|
||||
model.supports_reasoning_effort_updates = true;
|
||||
@@ -1186,7 +1186,7 @@ async fn incomplete_response_during_compaction_is_terminal_and_counted(
|
||||
let model_provider = provider(&server);
|
||||
let test = test_codex()
|
||||
.with_model(previous_model)
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_auth(CodexAuth::from_api_key("Test API Key"))
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
config.model_catalog = Some(ModelsResponse {
|
||||
@@ -2621,7 +2621,7 @@ async fn pre_sampling_compact_runs_on_switch_to_smaller_context_model() {
|
||||
|
||||
let model_provider = non_openai_model_provider(&server);
|
||||
let mut builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(previous_model)
|
||||
.with_config(move |config| {
|
||||
config.update_plan_enabled = true;
|
||||
@@ -2724,7 +2724,7 @@ async fn pre_sampling_compact_runs_when_comp_hash_changes() {
|
||||
|
||||
let model_provider = non_openai_model_provider(&server);
|
||||
let mut builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(previous_model)
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
@@ -2913,7 +2913,7 @@ async fn pre_sampling_compact_falls_back_from_retired_previous_model_after_renam
|
||||
|
||||
let model_provider = openai_model_provider(&server);
|
||||
let mut initial_builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(retired_model)
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
@@ -2956,7 +2956,7 @@ async fn pre_sampling_compact_falls_back_from_retired_previous_model_after_renam
|
||||
|
||||
let model_provider = openai_model_provider(&server);
|
||||
let mut resumed_builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(retired_model)
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
@@ -3052,7 +3052,7 @@ async fn pre_sampling_compact_falls_back_when_previous_model_is_not_found() {
|
||||
|
||||
let model_provider = openai_model_provider(&server);
|
||||
let mut initial_builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(retired_model)
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
@@ -3096,7 +3096,7 @@ async fn pre_sampling_compact_falls_back_when_previous_model_is_not_found() {
|
||||
let mut model_provider = openai_model_provider(&server);
|
||||
model_provider.stream_max_retries = Some(0);
|
||||
let mut resumed_builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(retired_model)
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
@@ -3200,7 +3200,7 @@ async fn pre_sampling_compact_falls_back_after_previous_model_invalid_request_on
|
||||
|
||||
let model_provider = openai_model_provider(&server);
|
||||
let mut builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(retired_model)
|
||||
.with_config(move |config| {
|
||||
config.model_provider_id = provider_id.to_owned();
|
||||
@@ -3319,7 +3319,7 @@ async fn pre_sampling_compact_falls_back_after_previous_model_stream_retries_are
|
||||
let mut model_provider = openai_model_provider(&server);
|
||||
model_provider.stream_max_retries = Some(2);
|
||||
let mut builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(previous_model)
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
@@ -3423,7 +3423,7 @@ async fn pre_sampling_compact_advised_errors_fall_back_then_retry_on_selected_mo
|
||||
model_provider.request_max_retries = Some(0);
|
||||
model_provider.stream_max_retries = Some(2);
|
||||
let test = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(previous_model)
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
@@ -3513,7 +3513,7 @@ async fn manual_remote_compact_advice_respects_retry_limit(max_retries: u64) {
|
||||
model_provider.request_max_retries = Some(0);
|
||||
model_provider.stream_max_retries = Some(max_retries);
|
||||
let test = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_auth(CodexAuth::from_api_key("Test API Key"))
|
||||
.with_model("gpt-5.4")
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
@@ -3689,7 +3689,7 @@ async fn pre_sampling_compact_skips_when_either_comp_hash_is_missing() {
|
||||
|
||||
let model_provider = non_openai_model_provider(&server);
|
||||
let mut builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(model_without_hash)
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
@@ -3794,7 +3794,7 @@ async fn body_after_prefix_model_switch_budget_compacts_with_next_model() {
|
||||
|
||||
let model_provider = non_openai_model_provider(&server);
|
||||
let mut builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(previous_model)
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
@@ -3888,7 +3888,7 @@ async fn pre_sampling_compact_runs_after_resume_and_switch_to_smaller_model() {
|
||||
|
||||
let model_provider = non_openai_model_provider(&server);
|
||||
let mut initial_builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(previous_model)
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
@@ -3931,7 +3931,7 @@ async fn pre_sampling_compact_runs_after_resume_and_switch_to_smaller_model() {
|
||||
|
||||
let model_provider = non_openai_model_provider(&server);
|
||||
let mut resumed_builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(previous_model)
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
@@ -4009,7 +4009,7 @@ async fn pre_sampling_compact_recovers_comp_hash_after_resume() {
|
||||
|
||||
let model_provider = non_openai_model_provider(&server);
|
||||
let mut initial_builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(previous_model)
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
@@ -4062,7 +4062,7 @@ async fn pre_sampling_compact_recovers_comp_hash_after_resume() {
|
||||
|
||||
let model_provider = non_openai_model_provider(&server);
|
||||
let mut resumed_builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(previous_model)
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
@@ -4136,7 +4136,7 @@ async fn pre_sampling_compact_skips_missing_comp_hash_after_resume() {
|
||||
|
||||
let model_provider = non_openai_model_provider(&server);
|
||||
let mut initial_builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(previous_model)
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
@@ -4187,7 +4187,7 @@ async fn pre_sampling_compact_skips_missing_comp_hash_after_resume() {
|
||||
|
||||
let model_provider = non_openai_model_provider(&server);
|
||||
let mut resumed_builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_catalog_discovery_api_key()
|
||||
.with_model(previous_model)
|
||||
.with_config(move |config| {
|
||||
config.model_provider = model_provider;
|
||||
@@ -5546,7 +5546,7 @@ async fn auto_compact_accounts_for_encrypted_reasoning(continuation: ContinueThr
|
||||
|
||||
let builder = || {
|
||||
test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_auth(CodexAuth::from_api_key("Test API Key"))
|
||||
.with_model_info_override("gpt-5.5", |model| {
|
||||
model.use_responses_lite = true;
|
||||
})
|
||||
@@ -5646,7 +5646,7 @@ async fn auto_compact_accounts_for_unreported_reasoning(
|
||||
]));
|
||||
let request_log = mount_sse_sequence(&server, responses).await;
|
||||
let test = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_auth(CodexAuth::from_api_key("Test API Key"))
|
||||
.with_model_info_override("gpt-5.5", move |model| {
|
||||
model.use_responses_lite = use_responses_lite;
|
||||
})
|
||||
@@ -5822,7 +5822,7 @@ async fn snapshot_request_shape_pre_turn_compaction_strips_incoming_model_switch
|
||||
|
||||
let model_provider = non_openai_model_provider(&server);
|
||||
let test = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_auth(CodexAuth::from_api_key("Test API Key"))
|
||||
.with_model_info_override(previous_model, |_| {})
|
||||
.with_config(move |config| {
|
||||
config.update_plan_enabled = true;
|
||||
@@ -6224,7 +6224,7 @@ async fn remote_v2_compaction_refreshes_instructions_and_preserves_them_on_cold_
|
||||
let mut builder = test_codex()
|
||||
.with_home(Arc::clone(&home))
|
||||
.with_model_info_override("gpt-5.5", |model| model.use_responses_lite = true)
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing());
|
||||
.with_auth(CodexAuth::from_api_key("Test API Key"));
|
||||
let test = builder.build(&server).await?;
|
||||
|
||||
// Materialize the old snapshot, rewrite the selected file in place, and compact remotely.
|
||||
@@ -6284,7 +6284,7 @@ async fn remote_v2_compaction_refreshes_instructions_and_preserves_them_on_cold_
|
||||
let mut resume_builder = test_codex()
|
||||
.with_home(Arc::clone(&home))
|
||||
.with_model_info_override("gpt-5.5", |model| model.use_responses_lite = true)
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_auth(CodexAuth::from_api_key("Test API Key"))
|
||||
.with_config(move |config| config.cwd = resumed_cwd);
|
||||
let resumed = resume_builder
|
||||
.resume(&server, Arc::clone(&home), rollout_path)
|
||||
@@ -6317,6 +6317,3 @@ async fn remote_v2_compaction_refreshes_instructions_and_preserves_them_on_cold_
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[path = "compact_program_tests.rs"]
|
||||
mod program_tests;
|
||||
|
||||
Reference in New Issue
Block a user