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:
andrea.difonzo
2026-11-10 16:20:15 +01:00
parent 82347a58ed
commit 6089fbde91
1573 changed files with 10289 additions and 177679 deletions

View File

@@ -310,7 +310,7 @@ async fn remote_compact_v2_retains_metadata_from_resumed_history() -> Result<()>
)
.await;
let builder = || test_codex().with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing());
let builder = || test_codex().with_auth(CodexAuth::from_api_key("Test API Key"));
let initial = builder()
.with_pre_build_hook(|home| {
fs::write(
@@ -366,7 +366,7 @@ async fn remote_compact_v2_retains_only_client_developer_messages_when_enabled(
let harness = TestCodexHarness::with_auto_env_builder(
test_codex()
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
.with_auth(CodexAuth::from_api_key("Test API Key"))
.with_config(move |config| {
if enabled {
config
@@ -455,7 +455,7 @@ async fn remote_compact_v2_records_usage_before_output_validation() -> Result<()
let harness = TestCodexHarness::with_auto_env_builder(
test_codex()
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
.with_auth(CodexAuth::from_api_key("Test API Key"))
.with_config(|config| {
config.model_auto_compact_token_limit = Some(200);
}),
@@ -682,7 +682,7 @@ async fn remote_compact_v2_charges_retained_images_to_token_budget(
let harness = TestCodexHarness::with_auto_env_builder(
test_codex()
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
.with_auth(CodexAuth::from_api_key("Test API Key"))
.with_config(move |config| {
let _ = config.features.enable(Feature::UnifiedImageBudget);
if let Some(enabled) = image_budget_enabled {
@@ -874,7 +874,7 @@ async fn remote_compact_v2_budgets_persisted_file_audio_atomically(
) -> Result<()> {
skip_if_no_network!(Ok(()));
let builder = test_codex()
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
.with_auth(CodexAuth::from_api_key("Test API Key"))
.with_config(|config| {
config
.features
@@ -1023,7 +1023,7 @@ async fn remote_compact_v2_reuses_compaction_trigger_for_followups() -> Result<(
skip_if_no_network!(Ok(()));
let harness = TestCodexHarness::with_builder(
test_codex().with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing()),
test_codex().with_auth(CodexAuth::from_api_key("Test API Key")),
)
.await?;
let image_url = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNgYAAAAAMAASsJTYQAAAAASUVORK5CYII=";
@@ -1400,7 +1400,7 @@ async fn remote_compact_v2_retries_failures_with_stream_retry_budget() -> Result
let harness = TestCodexHarness::with_builder(
test_codex()
.with_history_mode(ThreadHistoryMode::Paginated)
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
.with_auth(CodexAuth::from_api_key("Test API Key"))
.with_config(|config| {
config.model_provider.request_max_retries = Some(0);
config.model_provider.stream_max_retries = Some(2);
@@ -1519,7 +1519,7 @@ async fn remote_compact_v2_rewrites_multiple_trailing_function_call_outputs(
let harness = TestCodexHarness::with_builder(
test_codex()
.with_extensions(Arc::new(extensions.build()))
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
.with_auth(CodexAuth::from_api_key("Test API Key"))
.with_config(|config| {
config.model_context_window = Some(2_000);
config.model_auto_compact_token_limit = Some(200_000);
@@ -1740,7 +1740,7 @@ async fn remote_mid_turn_compact_v2_sends_turn_state_over_http() -> Result<()> {
let harness = TestCodexHarness::with_builder(
test_codex()
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
.with_auth(CodexAuth::from_api_key("Test API Key"))
.with_config(|config| {
config.model_auto_compact_token_limit = Some(200);
}),
@@ -1868,7 +1868,7 @@ async fn remote_mid_turn_compact_v2_sends_turn_state_over_websocket() -> Result<
]])
.await;
let mut builder = test_codex()
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
.with_auth(CodexAuth::from_api_key("Test API Key"))
.with_config(|config| {
config.model_auto_compact_token_limit = Some(200);
});