From 00dc5ea397713fa51851dad1a574b614dc75a97f Mon Sep 17 00:00:00 2001 From: sayan-oai Date: Tue, 23 Jun 2026 12:56:20 -0700 Subject: [PATCH] [codex] Fix stale approval policy in MCP test (#29696) ## Summary - replace the stale `AskForApproval::OnFailure` reference in the MCP connection manager test with `AskForApproval::OnRequest` - restore `codex-mcp` test compilation after `OnFailure` was removed in #28418 ## Root cause The test was added on main after the approval-policy removal branch had already updated the other references, so the newly added call site was missed when #28418 merged. ## Validation - `just test -p codex-mcp` (90 passed) - `just fmt` --- codex-rs/codex-mcp/src/connection_manager_tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codex-rs/codex-mcp/src/connection_manager_tests.rs b/codex-rs/codex-mcp/src/connection_manager_tests.rs index db7ef20ab..f4dfc1fd6 100644 --- a/codex-rs/codex-mcp/src/connection_manager_tests.rs +++ b/codex-rs/codex-mcp/src/connection_manager_tests.rs @@ -1031,7 +1031,7 @@ async fn shutdown_continues_after_caller_is_aborted() { } .boxed() .shared(); - let approval_policy = Constrained::allow_any(AskForApproval::OnFailure); + let approval_policy = Constrained::allow_any(AskForApproval::OnRequest); let permission_profile = Constrained::allow_any(PermissionProfile::default()); let mut manager = McpConnectionManager::new_uninitialized( &approval_policy,