Wire Windows sandbox selection into managed proxy routing (#45757)

## What changed

- Track the Windows sandbox implementation separately from its legacy setup level.
- Select dedicated proxy listeners for `WindowsMxc` on Windows across sessions, app-server command execution, and the sandbox CLI.
- Rebuild the session proxy when routing changes, retaining its network policy decider.
- Add a sandbox CLI execution path through the MXC sandbox transform when `WindowsMxc` is selected.

## Testing

Extend configuration assertions for the selected sandbox type and the session refresh test to verify dedicated routing and policy decider retention on Windows.

GitOrigin-RevId: 2a22192636c542022ec81a378a16c1bb6867e145
This commit is contained in:
iceweasel-oai authored and copyberry committed 2026-09-15 18:41:13 +00:00
1 parent af1fc2dbff
commit a5c15ab5c0
14 files changed
+185 -18

No files matched your search

+11
View File
@@ -9,6 +9,7 @@ use codex_login::default_client::originator;
use codex_otel::sanitize_metric_tag_value;
use codex_protocol::config_types::WindowsSandboxLevel;
use codex_protocol::models::PermissionProfile;
use codex_sandboxing::SandboxType;
use codex_utils_absolute_path::AbsolutePathBuf;
use std::collections::BTreeMap;
use std::collections::HashMap;
@@ -16,6 +17,16 @@ use std::path::Path;
use std::path::PathBuf;
use std::time::Instant;
pub fn managed_proxy_routing_for_windows_sandbox(
sandbox_type: SandboxType,
) -> codex_network_proxy::ManagedProxyRouting {
if cfg!(windows) && sandbox_type == SandboxType::WindowsMxc {
codex_network_proxy::ManagedProxyRouting::DedicatedListeners
} else {
codex_network_proxy::ManagedProxyRouting::SharedIngress
}
}
pub trait WindowsSandboxLevelExt {
fn from_config(config: &Config) -> WindowsSandboxLevel;
fn from_features(features: &Features) -> WindowsSandboxLevel;