Always use private desktops for legacy Windows sandboxes (#46554)

## What changed

- Remove the private-desktop opt-out from elevated and unelevated Windows sandbox launches.
- Remove `windows.sandbox_private_desktop` and its managed requirement and API fields. Warn users to remove the obsolete setting.
- Require a private desktop name when launching through the Windows sandbox wrapper and command runner.

## Testing

Add coverage for the obsolete-setting migration warning and update wrapper tests to verify a live private desktop is passed and a missing desktop name is rejected.

GitOrigin-RevId: c7135f8d211aac8d812180691c2c1e433d77cde4
This commit is contained in:
iceweasel-oai
2026-09-19 01:21:32 +00:00
committed by copyberry
parent c6f5d9e9b5
commit a633ebc124
94 changed files with 179 additions and 680 deletions
@@ -68,7 +68,6 @@ fn test_exec_request(
cwd: AbsolutePathBuf,
env: HashMap<String, String>,
) -> ExecRequest {
let windows_sandbox_private_desktop = false;
let permission_profile = turn.permission_profile();
let network = None;
let arg0 = None;
@@ -88,7 +87,6 @@ fn test_exec_request(
.collect::<std::io::Result<Vec<_>>>()
.expect("test workspace roots are host-native"),
turn.windows_sandbox_level,
windows_sandbox_private_desktop,
permission_profile,
arg0,
)
@@ -1408,7 +1408,6 @@ impl UnifiedExecProcessManager {
network_proxy_restricting_sid: network_proxy_restricting_sid.as_deref(),
proxy_settings_mode: windows_sandbox_proxy_settings_mode,
filesystem_overrides: request.windows_sandbox_filesystem_overrides.as_ref(),
use_private_desktop: request.windows_sandbox_private_desktop,
})
} else {
None
@@ -228,7 +228,6 @@ fn exec_server_params_use_path_uri_and_env_policy_overlay_contract() {
windows_sandbox_policy_cwd: cwd.clone().into(),
windows_sandbox_workspace_roots: vec![cwd],
windows_sandbox_level: codex_protocol::config_types::WindowsSandboxLevel::Disabled,
windows_sandbox_private_desktop: false,
permission_profile: permission_profile.clone(),
windows_sandbox_filesystem_overrides: None,
arg0: None,
@@ -102,9 +102,6 @@ impl Session {
environment.config().windows_sandbox_level,
environment.cwd(),
),
windows_sandbox_private_desktop: environment
.config()
.windows_sandbox_private_desktop,
windows_sandbox_proxy_settings_mode: Some(
session.windows_sandbox_proxy_settings_mode,
),