mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
Preserve executor path URIs in permission profile workspace roots (#45863)
## Why Executor profile roots can use path conventions that are not native to the current host. Converting them to host paths during configuration or turn reconstruction can reject or drop those roots, while case-insensitive comparison can hide Windows path spelling changes. ## What changed - Store profile roots as URI-backed `ProfileWorkspaceRoot` values throughout permission snapshots and thread settings, preserving spelling in equality and deduplication. - Keep effective workspace roots as `PathUri` values for permission materialization and status summaries. Convert Windows sandbox root hints to native paths only at native Windows sandbox boundaries, rejecting incompatible roots. - Omit the legacy rollout `workspace_roots` field when profile roots cannot be represented as host paths, retaining the compiled permission profile. ## Testing Add regression coverage for Windows and UNC root spelling changes, settings restoration and turn recording with foreign roots, executor-root status display, and backend-specific Windows root conversion. GitOrigin-RevId: 903c068fd74959bdd10e7cb1141aa42b953a59a4
This commit is contained in:
@@ -29,6 +29,7 @@ use codex_protocol::mcp::CallToolResult;
|
||||
use codex_protocol::mcp::ClientMcpExtensions;
|
||||
use codex_protocol::models::ActivePermissionProfile;
|
||||
use codex_protocol::models::PermissionProfile;
|
||||
use codex_protocol::models::ProfileWorkspaceRoot;
|
||||
use codex_protocol::models::ResponseItem;
|
||||
use codex_protocol::openai_models::ReasoningEffort;
|
||||
use codex_protocol::protocol::AskForApproval;
|
||||
@@ -91,7 +92,7 @@ pub struct ThreadConfigSnapshot {
|
||||
pub active_permission_profile: Option<ActivePermissionProfile>,
|
||||
pub environments: TurnEnvironmentSelections,
|
||||
pub workspace_roots: Vec<AbsolutePathBuf>,
|
||||
pub profile_workspace_roots: Vec<AbsolutePathBuf>,
|
||||
pub profile_workspace_roots: Vec<ProfileWorkspaceRoot>,
|
||||
pub ephemeral: bool,
|
||||
pub reasoning_effort: Option<ReasoningEffort>,
|
||||
pub reasoning_summary: Option<ReasoningSummary>,
|
||||
@@ -140,7 +141,7 @@ impl ThreadConfigSnapshot {
|
||||
pub struct CodexThreadSettingsOverrides {
|
||||
pub environments: Option<TurnEnvironmentSelections>,
|
||||
pub runtime_workspace_roots: Option<Vec<AbsolutePathBuf>>,
|
||||
pub profile_workspace_roots: Option<Vec<AbsolutePathBuf>>,
|
||||
pub profile_workspace_roots: Option<Vec<ProfileWorkspaceRoot>>,
|
||||
pub approval_policy: Option<AskForApproval>,
|
||||
pub approvals_reviewer: Option<ApprovalsReviewer>,
|
||||
pub sandbox_policy: Option<SandboxPolicy>,
|
||||
|
||||
@@ -3174,9 +3174,9 @@ async fn workspace_profile_applies_rules_to_runtime_and_profile_workspace_roots(
|
||||
assert_eq!(
|
||||
config.effective_workspace_roots(),
|
||||
vec![
|
||||
cwd_abs.clone(),
|
||||
runtime_root_abs.clone(),
|
||||
profile_root_abs.clone()
|
||||
PathUri::from_abs_path(&cwd_abs),
|
||||
PathUri::from_abs_path(&runtime_root_abs),
|
||||
PathUri::from_abs_path(&profile_root_abs),
|
||||
]
|
||||
);
|
||||
|
||||
@@ -3197,7 +3197,7 @@ async fn workspace_profile_applies_rules_to_runtime_and_profile_workspace_roots(
|
||||
}
|
||||
assert_eq!(
|
||||
config.permissions.profile_workspace_roots(),
|
||||
std::slice::from_ref(&profile_root_abs)
|
||||
&[profile_root_abs.into()]
|
||||
);
|
||||
assert_eq!(
|
||||
config.permissions.active_permission_profile(),
|
||||
|
||||
@@ -114,6 +114,7 @@ use codex_protocol::models::ActivePermissionProfile;
|
||||
use codex_protocol::models::BaseInstructionsProvenance;
|
||||
use codex_protocol::models::PermissionProfile;
|
||||
pub use codex_protocol::models::PermissionProfileSnapshot;
|
||||
use codex_protocol::models::ProfileWorkspaceRoot;
|
||||
use codex_protocol::models::SandboxEnforcement;
|
||||
use codex_protocol::openai_models::ModelMessages;
|
||||
use codex_protocol::openai_models::ModelsResponse;
|
||||
@@ -442,7 +443,7 @@ impl Permissions {
|
||||
&self.workspace_roots
|
||||
}
|
||||
|
||||
pub fn profile_workspace_roots(&self) -> &[AbsolutePathBuf] {
|
||||
pub fn profile_workspace_roots(&self) -> &[ProfileWorkspaceRoot] {
|
||||
self.permission_profile_state.profile_workspace_roots()
|
||||
}
|
||||
|
||||
@@ -1604,10 +1605,22 @@ impl Config {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn effective_workspace_roots(&self) -> Vec<AbsolutePathBuf> {
|
||||
let mut workspace_roots = self.workspace_roots.clone();
|
||||
workspace_roots.extend(self.permissions.profile_workspace_roots().iter().cloned());
|
||||
dedupe_absolute_paths(&mut workspace_roots);
|
||||
/// Combine runtime and profile roots without interpreting them on the current host.
|
||||
pub fn effective_workspace_roots(&self) -> Vec<PathUri> {
|
||||
let mut workspace_roots = self
|
||||
.workspace_roots
|
||||
.iter()
|
||||
.map(PathUri::from_abs_path)
|
||||
.collect::<Vec<_>>();
|
||||
workspace_roots.extend(
|
||||
self.permissions
|
||||
.profile_workspace_roots()
|
||||
.iter()
|
||||
.map(|root| root.as_uri().clone()),
|
||||
);
|
||||
// Preserve spelling changes even when Windows path comparison folds case.
|
||||
let mut seen = HashSet::new();
|
||||
workspace_roots.retain(|root| seen.insert(root.to_string()));
|
||||
workspace_roots
|
||||
}
|
||||
|
||||
@@ -3540,10 +3553,6 @@ impl Config {
|
||||
&mut startup_warnings,
|
||||
)?;
|
||||
let file_system_sandbox_policy = permission_profile.file_system_sandbox_policy();
|
||||
let configured_workspace_roots = configured_workspace_roots
|
||||
.iter()
|
||||
.map(PathUri::to_abs_path)
|
||||
.collect::<std::io::Result<Vec<_>>>()?;
|
||||
let active_permission_profile = if using_implicit_builtin_profile
|
||||
&& default_permissions == BUILT_IN_WORKSPACE_PROFILE
|
||||
&& cfg.sandbox_workspace_write.is_some()
|
||||
|
||||
@@ -372,7 +372,7 @@ pub struct CompiledPermissionProfile {
|
||||
|
||||
/// Resolves a selected profile and its roots using only supplied execution-host facts.
|
||||
/// Configured roots are materialized before return; symbolic roots remain available
|
||||
/// for runtime workspace selection. Local callers only convert the returned URI types.
|
||||
/// for runtime workspace selection. Callers retain URI roots until a native executor boundary.
|
||||
pub fn compile_permission_profile(
|
||||
permissions: Option<&PermissionsToml>,
|
||||
profile_name: &str,
|
||||
|
||||
@@ -3,7 +3,8 @@ use codex_config::ConstraintResult;
|
||||
use codex_protocol::models::ActivePermissionProfile;
|
||||
use codex_protocol::models::PermissionProfile;
|
||||
use codex_protocol::models::PermissionProfileSnapshot;
|
||||
use codex_utils_absolute_path::AbsolutePathBuf;
|
||||
use codex_protocol::models::ProfileWorkspaceRoot;
|
||||
use codex_utils_path_uri::PathUri;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub(crate) struct PermissionProfileState {
|
||||
@@ -22,7 +23,7 @@ impl PermissionProfileState {
|
||||
pub(crate) fn from_constrained_active_profile(
|
||||
constrained_permission_profile: Constrained<PermissionProfile>,
|
||||
active_permission_profile: Option<ActivePermissionProfile>,
|
||||
profile_workspace_roots: Vec<AbsolutePathBuf>,
|
||||
profile_workspace_roots: Vec<PathUri>,
|
||||
) -> ConstraintResult<Self> {
|
||||
let permission_profile = constrained_permission_profile.get().clone();
|
||||
let snapshot = match active_permission_profile {
|
||||
@@ -30,7 +31,10 @@ impl PermissionProfileState {
|
||||
PermissionProfileSnapshot::active_with_profile_workspace_roots(
|
||||
permission_profile,
|
||||
active_permission_profile,
|
||||
profile_workspace_roots,
|
||||
profile_workspace_roots
|
||||
.into_iter()
|
||||
.map(ProfileWorkspaceRoot::from)
|
||||
.collect(),
|
||||
)
|
||||
}
|
||||
None => PermissionProfileSnapshot::legacy(permission_profile),
|
||||
@@ -60,7 +64,7 @@ impl PermissionProfileState {
|
||||
self.permission_profile.get().active_permission_profile()
|
||||
}
|
||||
|
||||
pub(crate) fn profile_workspace_roots(&self) -> &[AbsolutePathBuf] {
|
||||
pub(crate) fn profile_workspace_roots(&self) -> &[ProfileWorkspaceRoot] {
|
||||
self.permission_profile.get().profile_workspace_roots()
|
||||
}
|
||||
|
||||
|
||||
@@ -1297,7 +1297,7 @@ url = "ws://127.0.0.1:8765"
|
||||
permission_profile: PermissionProfileSnapshot::active_with_profile_workspace_roots(
|
||||
PermissionProfile::read_only(),
|
||||
ActivePermissionProfile::read_only(),
|
||||
vec![cwd.join("profile-root")],
|
||||
vec![cwd.join("profile-root").into()],
|
||||
),
|
||||
shell_environment_policy: Default::default(),
|
||||
exec_policy: None,
|
||||
@@ -1562,7 +1562,7 @@ url = "ws://127.0.0.1:8765"
|
||||
permission_profile: PermissionProfileSnapshot::active_with_profile_workspace_roots(
|
||||
PermissionProfile::read_only(),
|
||||
ActivePermissionProfile::read_only(),
|
||||
vec![cwd.join("profile-root")],
|
||||
vec![cwd.join("profile-root").into()],
|
||||
),
|
||||
shell_environment_policy: Default::default(),
|
||||
exec_policy: None,
|
||||
@@ -1944,7 +1944,7 @@ url = "ws://127.0.0.1:8765"
|
||||
permission_profile: PermissionProfileSnapshot::active_with_profile_workspace_roots(
|
||||
PermissionProfile::read_only(),
|
||||
ActivePermissionProfile::read_only(),
|
||||
vec![cwd.join("child-profile-root")],
|
||||
vec![cwd.join("child-profile-root").into()],
|
||||
),
|
||||
shell_environment_policy: Default::default(),
|
||||
exec_policy: None,
|
||||
|
||||
@@ -308,11 +308,15 @@ pub async fn process_exec_tool_call(
|
||||
use_legacy_landlock: bool,
|
||||
stdout_stream: Option<StdoutStream>,
|
||||
) -> Result<ExecToolCallOutput> {
|
||||
let windows_sandbox_workspace_roots = windows_sandbox_workspace_roots
|
||||
.iter()
|
||||
.map(PathUri::from_abs_path)
|
||||
.collect::<Vec<_>>();
|
||||
let exec_req = build_exec_request(
|
||||
params,
|
||||
permission_profile,
|
||||
sandbox_cwd,
|
||||
windows_sandbox_workspace_roots,
|
||||
&windows_sandbox_workspace_roots,
|
||||
codex_linux_sandbox_exe,
|
||||
codex_self_exe,
|
||||
use_legacy_landlock,
|
||||
@@ -328,7 +332,7 @@ pub fn build_exec_request(
|
||||
params: ExecParams,
|
||||
permission_profile: &PermissionProfile,
|
||||
sandbox_cwd: &AbsolutePathBuf,
|
||||
windows_sandbox_workspace_roots: &[AbsolutePathBuf],
|
||||
windows_sandbox_workspace_roots: &[PathUri],
|
||||
codex_linux_sandbox_exe: &Option<PathBuf>,
|
||||
codex_self_exe: &Option<PathBuf>,
|
||||
use_legacy_landlock: bool,
|
||||
@@ -407,10 +411,24 @@ pub fn build_exec_request(
|
||||
windows_sandbox_private_desktop,
|
||||
})
|
||||
.map_err(CodexErr::from)?;
|
||||
let windows_sandbox_workspace_roots = if windows_sandbox_workspace_roots.is_empty() {
|
||||
vec![sandbox_cwd.clone()]
|
||||
// These hints belong to the native Windows backend. Other backends use
|
||||
// the materialized profile and must not project executor paths onto this host.
|
||||
let windows_sandbox_workspace_roots = if sandbox_type == SandboxType::WindowsRestrictedToken {
|
||||
if windows_sandbox_workspace_roots.is_empty() {
|
||||
vec![sandbox_cwd.clone()]
|
||||
} else {
|
||||
windows_sandbox_workspace_roots
|
||||
.iter()
|
||||
.map(PathUri::to_abs_path)
|
||||
.collect::<io::Result<Vec<_>>>()
|
||||
.map_err(|err| {
|
||||
CodexErr::InvalidRequest(format!(
|
||||
"invalid Windows sandbox workspace roots: {err}"
|
||||
))
|
||||
})?
|
||||
}
|
||||
} else {
|
||||
windows_sandbox_workspace_roots.to_vec()
|
||||
Vec::new()
|
||||
};
|
||||
ExecRequest::from_sandbox_exec_request(request, options, windows_sandbox_workspace_roots)
|
||||
}
|
||||
|
||||
@@ -1195,39 +1195,72 @@ fn process_exec_tool_call_uses_platform_sandbox_for_network_only_restrictions()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn build_exec_request_preserves_windows_workspace_roots() -> Result<()> {
|
||||
fn build_exec_request_projects_workspace_roots_only_for_windows_sandbox() -> Result<()> {
|
||||
let temp_dir = tempfile::TempDir::new()?;
|
||||
let cwd = temp_dir.path().abs();
|
||||
let additional_root = temp_dir.path().join("additional").abs();
|
||||
let workspace_roots = vec![cwd.clone(), additional_root];
|
||||
|
||||
let exec_request = build_exec_request(
|
||||
ExecParams {
|
||||
command: vec!["echo".to_string(), "ok".to_string()],
|
||||
cwd: cwd.clone(),
|
||||
expiration: ExecExpiration::DefaultTimeout,
|
||||
capture_policy: ExecCapturePolicy::ShellTool,
|
||||
env: HashMap::new(),
|
||||
network: None,
|
||||
network_environment_id: None,
|
||||
sandbox_permissions: SandboxPermissions::UseDefault,
|
||||
windows_sandbox_level: WindowsSandboxLevel::Disabled,
|
||||
windows_sandbox_private_desktop: false,
|
||||
justification: None,
|
||||
arg0: None,
|
||||
},
|
||||
&PermissionProfile::Disabled,
|
||||
&cwd,
|
||||
workspace_roots.as_slice(),
|
||||
&None,
|
||||
/*codex_self_exe*/ &None,
|
||||
/*use_legacy_landlock*/ false,
|
||||
let build_request = |profile: &PermissionProfile, roots: &[PathUri]| {
|
||||
build_exec_request(
|
||||
ExecParams {
|
||||
command: vec!["echo".to_string(), "ok".to_string()],
|
||||
cwd: cwd.clone(),
|
||||
expiration: ExecExpiration::DefaultTimeout,
|
||||
capture_policy: ExecCapturePolicy::ShellTool,
|
||||
env: HashMap::new(),
|
||||
network: None,
|
||||
network_environment_id: None,
|
||||
sandbox_permissions: SandboxPermissions::UseDefault,
|
||||
windows_sandbox_level: WindowsSandboxLevel::RestrictedToken,
|
||||
windows_sandbox_private_desktop: false,
|
||||
justification: None,
|
||||
arg0: None,
|
||||
},
|
||||
profile,
|
||||
&cwd,
|
||||
roots,
|
||||
&Some(temp_dir.path().join("codex-linux-sandbox")),
|
||||
/*codex_self_exe*/ &None,
|
||||
/*use_legacy_landlock*/ false,
|
||||
)
|
||||
};
|
||||
let native_roots = vec![cwd.clone(), temp_dir.path().join("additional").abs()];
|
||||
let request = build_request(
|
||||
&PermissionProfile::read_only(),
|
||||
&native_roots
|
||||
.iter()
|
||||
.map(PathUri::from_abs_path)
|
||||
.collect::<Vec<_>>(),
|
||||
)?;
|
||||
|
||||
assert_eq!(
|
||||
exec_request.windows_sandbox_workspace_roots,
|
||||
workspace_roots
|
||||
request.windows_sandbox_workspace_roots,
|
||||
if cfg!(windows) {
|
||||
native_roots
|
||||
} else {
|
||||
Vec::new()
|
||||
},
|
||||
);
|
||||
|
||||
let foreign_root = PathUri::parse(if cfg!(windows) {
|
||||
"file:///workspace"
|
||||
} else {
|
||||
"file:///C:/workspace"
|
||||
})
|
||||
.expect("foreign workspace URI");
|
||||
let roots = [PathUri::from_abs_path(&cwd), foreign_root];
|
||||
assert_eq!(
|
||||
build_request(&PermissionProfile::Disabled, &roots)?.windows_sandbox_workspace_roots,
|
||||
Vec::new(),
|
||||
);
|
||||
let request = build_request(&PermissionProfile::read_only(), &roots);
|
||||
if cfg!(windows) {
|
||||
let error = request.expect_err("native Windows sandbox must reject foreign roots");
|
||||
assert!(matches!(
|
||||
error.details(),
|
||||
codex_protocol::error::CodexErrorDetails::InvalidRequest(message)
|
||||
if message.starts_with("invalid Windows sandbox workspace roots:")
|
||||
));
|
||||
} else {
|
||||
assert_eq!(request?.windows_sandbox_workspace_roots, Vec::new());
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ use codex_protocol::SessionId;
|
||||
use codex_protocol::capabilities::SelectedCapabilityRoot;
|
||||
use codex_protocol::config_types::ShellEnvironmentPolicy;
|
||||
use codex_protocol::mcp::ClientMcpExtensions;
|
||||
use codex_protocol::models::ProfileWorkspaceRoot;
|
||||
use codex_protocol::permissions::FileSystemPath;
|
||||
use codex_protocol::permissions::FileSystemSpecialPath;
|
||||
use codex_protocol::protocol::EnvironmentConfig;
|
||||
@@ -545,7 +546,7 @@ impl SessionConfiguration {
|
||||
&mut self,
|
||||
permission_profile: PermissionProfile,
|
||||
active_permission_profile: Option<ActivePermissionProfile>,
|
||||
profile_workspace_roots: Vec<AbsolutePathBuf>,
|
||||
profile_workspace_roots: Vec<ProfileWorkspaceRoot>,
|
||||
preserve_deny_reads_from: Option<&FileSystemSandboxPolicy>,
|
||||
) -> ConstraintResult<()> {
|
||||
let enforcement = permission_profile.enforcement();
|
||||
@@ -589,7 +590,7 @@ pub(crate) struct SessionSettingsUpdate {
|
||||
pub(crate) step_settings: StepSettingsUpdate,
|
||||
pub(crate) environments: Option<TurnEnvironmentSelections>,
|
||||
pub(crate) runtime_workspace_roots: Option<Vec<AbsolutePathBuf>>,
|
||||
pub(crate) profile_workspace_roots: Option<Vec<AbsolutePathBuf>>,
|
||||
pub(crate) profile_workspace_roots: Option<Vec<ProfileWorkspaceRoot>>,
|
||||
pub(crate) sandbox_policy: Option<SandboxPolicy>,
|
||||
pub(crate) permission_profile: Option<PermissionProfile>,
|
||||
pub(crate) active_permission_profile: Option<ActivePermissionProfile>,
|
||||
|
||||
@@ -5606,7 +5606,7 @@ async fn permission_profile_updates_apply_to_next_turn_environment() {
|
||||
let updates = SessionSettingsUpdate {
|
||||
permission_profile: Some(PermissionProfile::read_only()),
|
||||
active_permission_profile: Some(active_profile.clone()),
|
||||
profile_workspace_roots: Some(vec![profile_root.clone()]),
|
||||
profile_workspace_roots: Some(vec![profile_root.clone().into()]),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@@ -5636,7 +5636,7 @@ async fn permission_profile_updates_apply_to_next_turn_environment() {
|
||||
PermissionProfileSnapshot::active_with_profile_workspace_roots(
|
||||
PermissionProfile::read_only(),
|
||||
active_profile,
|
||||
vec![profile_root],
|
||||
vec![profile_root.into()],
|
||||
);
|
||||
|
||||
assert_eq!(next_environment.config(), &expected_environment_config);
|
||||
|
||||
@@ -480,22 +480,22 @@ impl TurnContext {
|
||||
}
|
||||
|
||||
/// Combines the selected environment's workspace roots with its permission profile roots.
|
||||
pub(crate) fn effective_workspace_roots(&self) -> Vec<AbsolutePathBuf> {
|
||||
pub(crate) fn effective_workspace_roots(&self) -> Vec<PathUri> {
|
||||
let Some(environment) = self.environments.primary() else {
|
||||
return self.config.effective_workspace_roots();
|
||||
};
|
||||
|
||||
let mut workspace_roots = environment
|
||||
.workspace_roots()
|
||||
.iter()
|
||||
.filter_map(|root| root.to_abs_path().ok())
|
||||
.collect::<Vec<_>>();
|
||||
let mut workspace_roots = environment.workspace_roots().to_vec();
|
||||
for root in environment
|
||||
.config()
|
||||
.permission_profile
|
||||
.profile_workspace_roots()
|
||||
{
|
||||
if !workspace_roots.contains(root) {
|
||||
let root = root.as_uri();
|
||||
if !workspace_roots
|
||||
.iter()
|
||||
.any(|existing| existing.to_string() == root.to_string())
|
||||
{
|
||||
workspace_roots.push(root.clone());
|
||||
}
|
||||
}
|
||||
@@ -652,7 +652,31 @@ impl TurnContext {
|
||||
}
|
||||
|
||||
pub(crate) fn to_turn_context_item(&self) -> TurnContextItem {
|
||||
let workspace_roots = self.effective_workspace_roots();
|
||||
// The legacy rollout field still stores host-native paths. Keep its
|
||||
// runtime-root filtering and omit it for unrepresentable profile roots;
|
||||
// the authoritative permission profile retains its concrete entries.
|
||||
let profile_roots = self.environments.primary().map_or_else(
|
||||
|| self.config.permissions.profile_workspace_roots(),
|
||||
|environment| {
|
||||
environment
|
||||
.config()
|
||||
.permission_profile
|
||||
.profile_workspace_roots()
|
||||
},
|
||||
);
|
||||
let workspace_roots = if profile_roots
|
||||
.iter()
|
||||
.all(|root| root.as_uri().to_abs_path().is_ok())
|
||||
{
|
||||
let roots = self
|
||||
.effective_workspace_roots()
|
||||
.iter()
|
||||
.filter_map(|root| root.to_abs_path().ok())
|
||||
.collect::<Vec<_>>();
|
||||
(!roots.is_empty()).then_some(roots)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
#[allow(deprecated)]
|
||||
let cwd = self.cwd.clone();
|
||||
TurnContextItem {
|
||||
@@ -660,7 +684,7 @@ impl TurnContext {
|
||||
root_turn_id: self.turn_metadata_state.root_turn_id(),
|
||||
disabled_plugin_ids: Some(self.disabled_plugin_ids.clone()),
|
||||
cwd,
|
||||
workspace_roots: (!workspace_roots.is_empty()).then_some(workspace_roots),
|
||||
workspace_roots,
|
||||
current_date: self.current_date.clone(),
|
||||
timezone: self.timezone.clone(),
|
||||
approval_policy: self.approval_policy(),
|
||||
|
||||
@@ -224,7 +224,7 @@ pub(crate) async fn execute_user_shell_command(
|
||||
capture_policy: ExecCapturePolicy::ShellTool,
|
||||
sandbox: SandboxType::None,
|
||||
windows_sandbox_policy_cwd: cwd.clone().into(),
|
||||
windows_sandbox_workspace_roots: turn_context.effective_workspace_roots(),
|
||||
windows_sandbox_workspace_roots: Vec::new(),
|
||||
windows_sandbox_level: turn_context.windows_sandbox_level,
|
||||
windows_sandbox_private_desktop: turn_context
|
||||
.config
|
||||
|
||||
@@ -81,7 +81,12 @@ fn test_exec_request(
|
||||
ExecExpiration::DefaultTimeout,
|
||||
ExecCapturePolicy::ShellTool,
|
||||
SandboxType::None,
|
||||
turn.config.effective_workspace_roots(),
|
||||
turn.config
|
||||
.effective_workspace_roots()
|
||||
.iter()
|
||||
.map(PathUri::to_abs_path)
|
||||
.collect::<std::io::Result<Vec<_>>>()
|
||||
.expect("test workspace roots are host-native"),
|
||||
turn.windows_sandbox_level,
|
||||
windows_sandbox_private_desktop,
|
||||
permission_profile,
|
||||
|
||||
Reference in New Issue
Block a user