From 6c7f53890f9078f375869e8d34ec6df70cc6bf55 Mon Sep 17 00:00:00 2001 From: jif Date: Mon, 30 Nov 2026 15:10:07 +0000 Subject: [PATCH] Assert the turn stays active after declining exec approval (#64744) Check that the approval request's turn is still current before sending `Op::Interrupt` while the decline is waiting to be recorded. GitOrigin-RevId: c1e23a77efc0d5550e9ffa280d72bb66da711ed8 --- codex-rs/core/tests/suite/unified_exec_launch_failure_tests.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codex-rs/core/tests/suite/unified_exec_launch_failure_tests.rs b/codex-rs/core/tests/suite/unified_exec_launch_failure_tests.rs index fcabe0953f..c564cbefae 100644 --- a/codex-rs/core/tests/suite/unified_exec_launch_failure_tests.rs +++ b/codex-rs/core/tests/suite/unified_exec_launch_failure_tests.rs @@ -185,13 +185,14 @@ decision = "prompt" test.codex .submit(Op::ExecApproval { id: prompt.effective_approval_id(), - turn_id: Some(prompt.turn_id), + turn_id: Some(prompt.turn_id.clone()), decision, }) .await?; gate.entered.notified().await; if stop_after_decline { + assert_eq!(test.codex.current_turn_id().await, Some(prompt.turn_id)); test.codex.submit(Op::Interrupt).await?; } // The sibling should stop even while history is waiting to record the decline.