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:
jif
2026-11-30 15:22:51 +00:00
committed by copyberry
parent 7caec30d71
commit 6c7f53890f
@@ -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.