WIP fase 2b-3: rimozione sottosistemi solo-ChatGPT (plugin remoti, image gen, daybreak, cyber, attestation, cloud config, app/connettori) - test in corso
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
#[cfg(unix)]
|
||||
use codex_config::test_support::CloudConfigBundleFixture;
|
||||
use codex_config::test_support::ManagedConfigFixture;
|
||||
use codex_config::types::ApprovalsReviewer;
|
||||
use codex_core::CodexThread;
|
||||
use codex_core::TurnInputRequest;
|
||||
@@ -39,7 +39,7 @@ use codex_protocol::protocol::ReviewDecision;
|
||||
use codex_protocol::protocol::SandboxPolicy;
|
||||
use codex_protocol::protocol::ThreadSettingsOverrides;
|
||||
use codex_protocol::user_input::UserInput;
|
||||
use core_test_support::managed_network_requirements_loader;
|
||||
use core_test_support::managed_network_requirements;
|
||||
use core_test_support::responses::ev_apply_patch_custom_tool_call;
|
||||
use core_test_support::responses::ev_assistant_message;
|
||||
use core_test_support::responses::ev_completed;
|
||||
@@ -2890,7 +2890,7 @@ ZDOTDIR = "{}"
|
||||
)?;
|
||||
let mut builder = builder
|
||||
.with_home(home)
|
||||
.with_cloud_config_bundle(managed_network_requirements_loader());
|
||||
.with_managed_config(managed_network_requirements());
|
||||
if !allow_login_shell {
|
||||
let Some(bash) = codex_core::shell::get_shell(codex_core::shell::ShellType::Bash) else {
|
||||
return Ok(());
|
||||
@@ -3210,7 +3210,7 @@ async fn brokered_shell_snapshot_fallback(mode: &'static str) -> Result<()> {
|
||||
_ => "network_proxy = { enabled = true, credential_broker = true }",
|
||||
};
|
||||
let network_enabled = !matches!(mode, "flat_no_proxy" | "flat_policy_without_proxy");
|
||||
let cloud_config_bundle = match mode {
|
||||
let managed_config = match mode {
|
||||
"disabled" | "failed" | "managed_disabled" | "managed_failed" => {
|
||||
let feature_requirements = if mode.starts_with("managed_") {
|
||||
format!(
|
||||
@@ -3220,23 +3220,23 @@ async fn brokered_shell_snapshot_fallback(mode: &'static str) -> Result<()> {
|
||||
} else {
|
||||
String::new()
|
||||
};
|
||||
CloudConfigBundleFixture::loader_with_enterprise_requirement(format!(
|
||||
ManagedConfigFixture::requirements(format!(
|
||||
"{feature_requirements}\n[experimental_network]\nenabled = true\nallow_local_binding = true\n\
|
||||
[experimental_network.domains]\n\"credential-masking-denied.invalid\" = \"deny\"\n"
|
||||
))
|
||||
}
|
||||
"flat_no_proxy" | "flat_profile_transition" => {
|
||||
CloudConfigBundleFixture::loader_with_enterprise_requirement("")
|
||||
ManagedConfigFixture::requirements("")
|
||||
}
|
||||
"flat_disabled_proxy" => CloudConfigBundleFixture::loader_with_enterprise_requirement(
|
||||
"flat_disabled_proxy" => ManagedConfigFixture::requirements(
|
||||
"[experimental_network]\nenabled = false",
|
||||
),
|
||||
"flat_policy_without_proxy" => {
|
||||
CloudConfigBundleFixture::loader_with_enterprise_requirement(
|
||||
ManagedConfigFixture::requirements(
|
||||
"[experimental_network]\nallow_local_binding = true",
|
||||
)
|
||||
}
|
||||
_ => managed_network_requirements_loader(),
|
||||
_ => managed_network_requirements(),
|
||||
};
|
||||
let home = Arc::new(TempDir::new()?);
|
||||
let default_permissions = if mode == "flat_yolo" {
|
||||
@@ -3279,7 +3279,7 @@ GH_TOKEN = "{REAL_GITHUB_TOKEN}"
|
||||
let mut builder = test_codex()
|
||||
.with_home(home)
|
||||
.with_user_shell(bash)
|
||||
.with_cloud_config_bundle(cloud_config_bundle)
|
||||
.with_managed_config(managed_config)
|
||||
.with_config(move |config| {
|
||||
config.permissions.approval_policy = Constrained::allow_any(approval_policy);
|
||||
if mode == "flat_managed" {
|
||||
@@ -3626,7 +3626,7 @@ ENV = "{}"
|
||||
let test = test_codex()
|
||||
.with_home(home)
|
||||
.with_user_shell(shell)
|
||||
.with_cloud_config_bundle(managed_network_requirements_loader())
|
||||
.with_managed_config(managed_network_requirements())
|
||||
.with_config(move |config| {
|
||||
config.permissions.approval_policy = Constrained::allow_any(AskForApproval::Never);
|
||||
config.permissions.allow_login_shell = true;
|
||||
@@ -4097,7 +4097,7 @@ allow_local_binding = true
|
||||
let sandbox_policy_for_config = sandbox_policy.clone();
|
||||
let mut builder = test_codex()
|
||||
.with_home(home)
|
||||
.with_cloud_config_bundle(managed_network_requirements_loader())
|
||||
.with_managed_config(managed_network_requirements())
|
||||
.with_config(move |config| {
|
||||
config.permissions.approval_policy = Constrained::allow_any(approval_policy);
|
||||
config
|
||||
@@ -4383,7 +4383,7 @@ allow_local_binding = true
|
||||
};
|
||||
let mut builder = test_codex()
|
||||
.with_home(home)
|
||||
.with_cloud_config_bundle(managed_network_requirements_loader())
|
||||
.with_managed_config(managed_network_requirements())
|
||||
.with_config(move |config| {
|
||||
config.permissions.approval_policy = Constrained::allow_any(approval_policy);
|
||||
});
|
||||
@@ -4585,7 +4585,7 @@ allow_local_binding = true
|
||||
};
|
||||
let mut builder = test_codex()
|
||||
.with_home(home)
|
||||
.with_cloud_config_bundle(managed_network_requirements_loader())
|
||||
.with_managed_config(managed_network_requirements())
|
||||
.with_config(move |config| {
|
||||
config.permissions.approval_policy = Constrained::allow_any(approval_policy);
|
||||
let cwd = config.cwd.clone();
|
||||
|
||||
Reference in New Issue
Block a user