Merge 191b530dc1 into sapling-pr-archive-bolinfest

This commit is contained in:
Michael Bolin
2026-02-10 00:10:37 -08:00
committed by GitHub
3 changed files with 5 additions and 8 deletions

View File

@@ -130,10 +130,7 @@ async fn run_command_under_sandbox(
let sandbox_policy_cwd = cwd.clone();
let stdio_policy = StdioPolicy::Inherit;
let mut env = create_env(&config.shell_environment_policy, None);
if let Some(network) = config.network.as_ref() {
network.apply_to_env(&mut env);
}
let env = create_env(&config.shell_environment_policy, None);
// Special-case Windows sandbox: execute and exit the process to emulate inherited stdio.
if let SandboxType::Windows = sandbox_type {
@@ -225,7 +222,7 @@ async fn run_command_under_sandbox(
config.sandbox_policy.get(),
sandbox_policy_cwd.as_path(),
stdio_policy,
None,
config.network,
env,
)
.await?
@@ -245,7 +242,7 @@ async fn run_command_under_sandbox(
sandbox_policy_cwd.as_path(),
use_bwrap_sandbox,
stdio_policy,
None,
config.network,
env,
)
.await?

View File

@@ -147,7 +147,7 @@ pub(crate) async fn execute_user_shell_command(
&turn_context.shell_environment_policy,
Some(session.conversation_id),
),
network: turn_context.config.network.clone(),
network: turn_context.network.clone(),
// TODO(zhao-oai): Now that we have ExecExpiration::Cancellation, we
// should use that instead of an "arbitrarily large" timeout here.
expiration: USER_SHELL_TIMEOUT_MS.into(),

View File

@@ -192,7 +192,7 @@ impl ToolHandler for UnifiedExecHandler {
yield_time_ms,
max_output_tokens,
workdir,
network: context.turn.config.network.clone(),
network: context.turn.network.clone(),
tty,
sandbox_permissions,
justification,