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

@@ -8,9 +8,7 @@ use ctor::ctor;
use std::sync::OnceLock;
use tempfile::TempDir;
use codex_config::CloudConfigBundleLoader;
use codex_config::LoaderOverrides;
use codex_config::test_support::CloudConfigBundleFixture;
use codex_config::test_support::ManagedConfigFixture;
use codex_core::CodexThread;
use codex_core::config::Config;
use codex_core::config::ConfigBuilder;
@@ -24,7 +22,7 @@ use regex_lite::Regex;
use std::path::Path;
use std::path::PathBuf;
pub mod apps_test_server;
pub mod mcp_test_server;
#[cfg(unix)]
pub mod code_mode_host;
pub mod context_snapshot;
@@ -34,7 +32,6 @@ pub mod network_policy_mcp;
pub mod oauth;
pub mod process;
pub mod responses;
pub mod runtime_auth;
pub mod startup;
pub mod streaming_sse;
pub mod test_codex;
@@ -200,31 +197,31 @@ pub fn fetch_dotslash_file(
/// temporary directory. Using a per-test directory keeps tests hermetic and
/// avoids clobbering a developer’s real `~/.codex`.
pub async fn load_default_config_for_test(codex_home: &TempDir) -> Config {
load_default_config_for_test_with_cloud_config_bundle(
codex_home,
CloudConfigBundleLoader::default(),
)
.await
load_default_config_for_test_with_managed_config(codex_home, ManagedConfigFixture::default())
.await
}
/// Returns a default `Config` with test-provided cloud bundle requirements applied.
/// during config construction.
pub async fn load_default_config_for_test_with_cloud_config_bundle(
/// Returns a default `Config` with test-provided local managed requirements and
/// config applied. The fixture is written below `codex_home` and loaded as the
/// system `requirements.toml` / `config.toml`.
pub async fn load_default_config_for_test_with_managed_config(
codex_home: &TempDir,
cloud_config_bundle: CloudConfigBundleLoader,
managed_config: ManagedConfigFixture,
) -> Config {
let loader_overrides = managed_config
.loader_overrides_for_tests(codex_home.path())
.expect("managed config fixture should be writable");
ConfigBuilder::default()
.loader_overrides(LoaderOverrides::without_managed_config_for_tests())
.loader_overrides(loader_overrides)
.codex_home(codex_home.path().to_path_buf())
.harness_overrides(default_test_overrides())
.cloud_config_bundle(cloud_config_bundle)
.build()
.await
.expect("defaults for test should always succeed")
}
pub fn managed_network_requirements_loader() -> CloudConfigBundleLoader {
CloudConfigBundleFixture::loader_with_enterprise_requirement(
pub fn managed_network_requirements() -> ManagedConfigFixture {
ManagedConfigFixture::requirements(
r#"
[experimental_network]
enabled = true