codex: match guardian selector request by cache key

This commit is contained in:
Ahmed Ibrahim
2026-06-01 14:29:22 -07:00
parent 2a541b8702
commit 62785c8f4d

View File

@@ -356,7 +356,8 @@ async fn guardian_stays_disabled_when_model_selects_multi_agent_v2() -> Result<(
let guardian_mock = mount_sse_once_match(
&server,
|req: &Request| {
body_contains(req, GUARDIAN_REASON) && body_contains(req, ">>> APPROVAL REQUEST START")
body_contains(req, GUARDIAN_REASON)
&& body_contains(req, r#""prompt_cache_key":"guardian:"#)
},
sse(vec![
ev_response_created("resp-guardian"),