From 1e5a613c55e13ded2c76e3c0b74e769fbbba5c79 Mon Sep 17 00:00:00 2001 From: Ahmed Ibrahim Date: Fri, 12 Sep 2025 11:48:01 -0400 Subject: [PATCH] patch-tools --- codex-rs/core/tests/suite/client.rs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/codex-rs/core/tests/suite/client.rs b/codex-rs/core/tests/suite/client.rs index 40664679f5..bacd05e93d 100644 --- a/codex-rs/core/tests/suite/client.rs +++ b/codex-rs/core/tests/suite/client.rs @@ -912,6 +912,11 @@ async fn history_dedupes_streamed_and_final_messages_across_turns() { // 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!([ + { + "type": "message", + "role": "user", + "content": [{"type":"input_text","text":"\n /Users/aibrahim/code/codex/codex-rs/core\n on-request\n read-only\n restricted\n zsh\n"}] + }, { "type": "message", "role": "user", @@ -922,6 +927,11 @@ async fn history_dedupes_streamed_and_final_messages_across_turns() { "role": "assistant", "content": [{"type":"output_text","text":"Hey there!\n"}] }, + { + "type": "message", + "role": "user", + "content": [{"type":"input_text","text":"\n /Users/aibrahim/code/codex/codex-rs/core\n on-request\n read-only\n restricted\n zsh\n"}] + }, { "type": "message", "role": "user", @@ -932,6 +942,11 @@ async fn history_dedupes_streamed_and_final_messages_across_turns() { "role": "assistant", "content": [{"type":"output_text","text":"Hey there!\n"}] }, + { + "type": "message", + "role": "user", + "content": [{"type":"input_text","text":"\n /Users/aibrahim/code/codex/codex-rs/core\n on-request\n read-only\n restricted\n zsh\n"}] + }, { "type": "message", "role": "user", @@ -939,8 +954,5 @@ async fn history_dedupes_streamed_and_final_messages_across_turns() { } ]); - // skipping earlier context and developer messages - let tail_len = r3_tail_expected.as_array().unwrap().len(); - let actual_tail = &r3_input_array[r3_input_array.len() - tail_len..]; - assert_eq!(serde_json::json!(actual_tail), r3_tail_expected); + assert_eq!(serde_json::json!(r3_input_array), r3_tail_expected); }