patch-tools

This commit is contained in:
Ahmed Ibrahim
2025-09-12 11:49:14 -04:00
parent 1e5a613c55
commit 6884c6ccf6
+8 -8
View File
@@ -901,14 +901,6 @@ async fn history_dedupes_streamed_and_final_messages_across_turns() {
let requests = server.received_requests().await.unwrap();
assert_eq!(requests.len(), 3, "expected 3 requests (one per turn)");
let r3_input_array = requests[2]
.body_json::<serde_json::Value>()
.unwrap()
.get("input")
.and_then(|v| v.as_array())
.cloned()
.expect("r3 missing input array");
// Assert on the last five messages of the input history for request 3.
// We expect the conversation tail to be [U1, A, U2, A, U3], skipping earlier context and developer messages.
let r3_tail_expected = serde_json::json!([
@@ -954,5 +946,13 @@ async fn history_dedupes_streamed_and_final_messages_across_turns() {
}
]);
let r3_input_array = requests[2]
.body_json::<serde_json::Value>()
.unwrap()
.get("input")
.and_then(|v| v.as_array())
.cloned()
.expect("r3 missing input array");
assert_eq!(serde_json::json!(r3_input_array), r3_tail_expected);
}