mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Assert Guardian prompt cache key reuse (#24894)
Split from the Guardian prompt cache key change. This PR only updates codex-rs/core/src/guardian/tests.rs. Validation was not run per request; this branch is expected to rely on the companion split PRs.
This commit is contained in:
committed by
GitHub
Unverified
parent
4ce563a873
commit
4e57239cac
@@ -2106,7 +2106,13 @@ async fn guardian_parallel_reviews_fork_from_last_committed_trunk_history() -> a
|
||||
assert_eq!(third_decision, ReviewDecision::Approved);
|
||||
let requests = server.requests().await;
|
||||
assert_eq!(requests.len(), 3);
|
||||
let second_request_body = serde_json::from_slice::<serde_json::Value>(&requests[1])?;
|
||||
let third_request_body = serde_json::from_slice::<serde_json::Value>(&requests[2])?;
|
||||
assert_eq!(
|
||||
second_request_body["prompt_cache_key"],
|
||||
third_request_body["prompt_cache_key"],
|
||||
"forked guardian review should reuse the trunk guardian prompt cache key"
|
||||
);
|
||||
let third_request_body_text = third_request_body.to_string();
|
||||
assert!(
|
||||
third_request_body_text.contains("first guardian rationale"),
|
||||
|
||||
Reference in New Issue
Block a user