From ecf2eda43398b8f5093c6b304bca286cb39a5b73 Mon Sep 17 00:00:00 2001 From: Frank Song Date: Fri, 26 Jun 2026 18:08:49 +0800 Subject: [PATCH] Update pending user reattach regression Co-Authored-By: Paperclip --- tests/test_issue2341_pending_user_reattach.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/test_issue2341_pending_user_reattach.py b/tests/test_issue2341_pending_user_reattach.py index 5e1710940..a2025f67b 100644 --- a/tests/test_issue2341_pending_user_reattach.py +++ b/tests/test_issue2341_pending_user_reattach.py @@ -64,7 +64,14 @@ def test_pending_user_message_dedup_checks_current_message_array(): "Pending-message dedup must inspect the current S.messages/INFLIGHT " "array, not only session.messages from the metadata response" ) - assert "lastText===text" in helper, ( - "Pending-message merge must suppress duplicates when the last user row " - "already matches pending_user_message" + assert "_pendingCurrentTailUserMessage(messages)" in helper, ( + "Pending-message dedup must inspect only the current tail user row, " + "not a historical same-text row" + ) + assert "sameCurrentTurn" in helper and "return null;" in helper, ( + "Pending-message merge must still suppress duplicates when the current " + "tail user row already matches pending_user_message" + ) + assert "[...messages].reverse().find" not in helper, ( + "Pending-message dedup must not reverse-scan historical user rows" )