From af700180808cce2ce28a31aad0fbad4dc58b857a Mon Sep 17 00:00:00 2001 From: jif Date: Wed, 19 Aug 2026 15:08:32 +0000 Subject: [PATCH] Use default timeouts in cyber exec policy tests (#39496) ## What changed Stop setting explicit one-second `timeout_ms` and `yield_time_ms` values in the mock command calls. The shell command and unified exec variants now use their default timing behavior while testing cyber exec policy. GitOrigin-RevId: b1c25304ca47e7b08f023fe678467fc00330158b --- codex-rs/core/tests/suite/cyber_exec_policy.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/codex-rs/core/tests/suite/cyber_exec_policy.rs b/codex-rs/core/tests/suite/cyber_exec_policy.rs index 8ac4e1b084..183c0b6784 100644 --- a/codex-rs/core/tests/suite/cyber_exec_policy.rs +++ b/codex-rs/core/tests/suite/cyber_exec_policy.rs @@ -91,9 +91,9 @@ fn configure_saved_prefix_and_guardian(config: &mut Config) { } fn command_response(response_id: &str, call_id: &str, command_tool: CommandTool) -> Result { - let (tool_name, command_key, timeout_key) = match command_tool { - CommandTool::ShellCommand => ("shell_command", "command", "timeout_ms"), - CommandTool::UnifiedExec => ("exec_command", "cmd", "yield_time_ms"), + let (tool_name, command_key) = match command_tool { + CommandTool::ShellCommand => ("shell_command", "command"), + CommandTool::UnifiedExec => ("exec_command", "cmd"), }; let mut args = json!({ "sandbox_permissions": SandboxPermissions::RequireEscalated, @@ -101,8 +101,6 @@ fn command_response(response_id: &str, call_id: &str, command_tool: CommandTool) "prefix_rule": ["git", "version"], }); args[command_key] = json!(TEST_COMMAND); - args[timeout_key] = json!(1_000); - Ok(sse(vec![ ev_response_created(response_id), ev_function_call(call_id, tool_name, &serde_json::to_string(&args)?),