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:
@@ -2,24 +2,44 @@ use super::*;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[test]
|
||||
fn adds_enterprise_requirements_in_order() {
|
||||
let bundle = CloudConfigBundleFixture::enterprise_requirement("first")
|
||||
.add_enterprise_requirement("second")
|
||||
.into_bundle();
|
||||
fn earlier_requirement_fragments_take_precedence() {
|
||||
let fixture = ManagedConfigFixture::requirements("[features]\na = true\n")
|
||||
.with_requirements("[features]\na = false\nb = false\n");
|
||||
|
||||
let merged: TomlValue = toml::from_str(
|
||||
&fixture
|
||||
.requirements_toml()
|
||||
.expect("merge requirements")
|
||||
.expect("requirements present"),
|
||||
)
|
||||
.expect("merged requirements parse");
|
||||
|
||||
assert_eq!(
|
||||
bundle.requirements_toml.enterprise_managed,
|
||||
vec![
|
||||
CloudRequirementsFragment {
|
||||
id: "req_1".to_string(),
|
||||
name: "Base requirements".to_string(),
|
||||
contents: "first".to_string(),
|
||||
},
|
||||
CloudRequirementsFragment {
|
||||
id: "req_2".to_string(),
|
||||
name: "Requirements 2".to_string(),
|
||||
contents: "second".to_string(),
|
||||
},
|
||||
]
|
||||
merged,
|
||||
toml::from_str::<TomlValue>("[features]\na = true\nb = false\n").expect("expected toml"),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn writes_fixture_files_as_system_layers() {
|
||||
let dir = tempfile::tempdir().expect("tempdir");
|
||||
let fixture = ManagedConfigFixture::requirements("allowed_approval_policies = [\"never\"]\n")
|
||||
.with_config("model = \"managed\"\n");
|
||||
|
||||
let overrides = fixture
|
||||
.loader_overrides_for_tests(dir.path())
|
||||
.expect("write fixture");
|
||||
|
||||
let requirements_path = overrides
|
||||
.system_requirements_path
|
||||
.expect("requirements path");
|
||||
let config_path = overrides.system_config_path.expect("config path");
|
||||
assert_eq!(
|
||||
std::fs::read_to_string(requirements_path).expect("read requirements"),
|
||||
"allowed_approval_policies = [\"never\"]\n"
|
||||
);
|
||||
assert_eq!(
|
||||
std::fs::read_to_string(config_path).expect("read config"),
|
||||
"model = \"managed\"\n"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user