windows-sandbox: pass workspace roots to runner

This commit is contained in:
Michael Bolin
2026-05-27 17:01:49 -07:00
parent 0db49a7e6a
commit bc6a9d2910
34 changed files with 460 additions and 213 deletions
+6 -2
View File
@@ -697,12 +697,13 @@ mod tests {
let cwd = AbsolutePathBuf::current_dir().expect("current dir");
ExecRequest::new(
vec!["cmd".to_string()],
cwd,
cwd.clone(),
HashMap::new(),
/*network*/ None,
ExecExpiration::DefaultTimeout,
codex_core::exec::ExecCapturePolicy::ShellTool,
SandboxType::WindowsRestrictedToken,
vec![cwd],
WindowsSandboxLevel::Disabled,
/*windows_sandbox_private_desktop*/ false,
PermissionProfile::read_only(),
@@ -819,6 +820,7 @@ mod tests {
ExecExpiration::Cancellation(CancellationToken::new()),
codex_core::exec::ExecCapturePolicy::ShellTool,
SandboxType::None,
vec![cwd.clone()],
WindowsSandboxLevel::Disabled,
/*windows_sandbox_private_desktop*/ false,
PermissionProfile::read_only(),
@@ -887,6 +889,7 @@ mod tests {
};
let cancellation = CancellationToken::new();
let cancel = cancellation.clone();
let cwd = AbsolutePathBuf::current_dir().expect("current dir");
manager
.start(StartCommandExecParams {
@@ -898,7 +901,7 @@ mod tests {
process_id: Some("proc-101".to_string()),
exec_request: ExecRequest::new(
vec!["sh".to_string(), "-lc".to_string(), "sleep 30".to_string()],
AbsolutePathBuf::current_dir().expect("current dir"),
cwd.clone(),
HashMap::new(),
/*network*/ None,
ExecExpiration::TimeoutOrCancellation {
@@ -907,6 +910,7 @@ mod tests {
},
codex_core::exec::ExecCapturePolicy::ShellTool,
SandboxType::None,
vec![cwd],
WindowsSandboxLevel::Disabled,
/*windows_sandbox_private_desktop*/ false,
PermissionProfile::read_only(),
@@ -77,7 +77,7 @@ impl WindowsSandboxRequestProcessor {
let setup_request = WindowsSandboxSetupRequest {
mode,
permission_profile: config.permissions.effective_permission_profile(),
permission_profile_cwd: config.cwd.to_path_buf(),
workspace_roots: config.effective_workspace_roots(),
command_cwd,
env_map: std::env::vars().collect(),
codex_home: config.codex_home.to_path_buf(),