mirror of
https://github.com/openai/codex.git
synced 2026-12-02 00:31:03 +00:00
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
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user