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

@@ -363,25 +363,12 @@ fn policy_rejection_diagnostic(error: &anyhow::Error) -> String {
let stage = match error.to_string().as_str() {
"start managed configuration runtime" => "runtime",
"load bootstrap configuration" => "bootstrap",
"resolve cloud configuration authentication" => "resolve_auth",
"initialize cloud configuration authentication" => "initialize_auth",
"load managed configuration" => "managed",
"enforce managed provisioning requirements" => "enforce",
_ => "unknown",
};
let detail = error.chain().find_map(|cause| {
let io = cause.downcast_ref::<std::io::Error>();
let inner = io
.and_then(std::io::Error::get_ref)
.map(|inner| inner as &(dyn std::error::Error + 'static))
.unwrap_or(cause);
if let Some(cloud) = inner.downcast_ref::<codex_config::CloudConfigBundleLoadError>() {
return Some(format!(
"cloud={:?} http={:?}",
cloud.code(),
cloud.status_code()
));
}
io.map(|io| format!("io={:?} win32={:?}", io.kind(), io.raw_os_error()))
});
let detail = detail.unwrap_or_else(|| "cause=unavailable".to_string());

View File

@@ -336,19 +336,7 @@ fn policy_event_excludes_real_parser_values_but_retains_safe_codes() {
contents,
)])
.unwrap_err();
let fragment = codex_config::cloud_config_layers_from_fragments(
[codex_config::CloudConfigFragment {
id: "synthetic-id".into(),
name: "private-name".into(),
contents: contents.into(),
}],
&Path::new(r"C:\CodexTest").try_into().unwrap(),
)
.unwrap_err();
for error in [
std::io::Error::from(requirements),
std::io::Error::from(fragment),
] {
for error in [std::io::Error::from(requirements)] {
let error = anyhow::Error::new(error).context("load managed configuration");
assert!(format!("{error:#}").contains("synthetic-secret"));
assert!(!is_config_parse_error(&error));
@@ -364,15 +352,6 @@ fn policy_event_excludes_real_parser_values_but_retains_safe_codes() {
.context("load bootstrap configuration"),
"stage=bootstrap io=PermissionDenied win32=Some(5)",
),
(
anyhow::Error::new(codex_config::CloudConfigBundleLoadError::new(
codex_config::CloudConfigBundleLoadErrorCode::RequestFailed,
Some(503),
contents,
))
.context("load managed configuration"),
"stage=managed cloud=RequestFailed http=Some(503)",
),
(
anyhow::anyhow!("{contents}"),
"stage=unknown cause=unavailable",