From 2f86283217c610be9a4051823ec6ca59cdf81aea Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Sat, 20 Jun 2026 20:51:01 +0530 Subject: [PATCH] test(signal): update echo-discard test for OrderedDict ring The hardened echo ring (#31250) changes _recent_sent_timestamps from a set to an OrderedDict, so the reply-detection-cache regression test from the quote salvage can no longer call .discard(); route it through the new _consume_sent_timestamp() helper, which is the real echo-removal path. --- tests/gateway/test_signal.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/gateway/test_signal.py b/tests/gateway/test_signal.py index 123c3660a06..067862d540d 100644 --- a/tests/gateway/test_signal.py +++ b/tests/gateway/test_signal.py @@ -1573,7 +1573,9 @@ class TestSignalQuoteExtraction: async def test_track_sent_timestamp_keeps_reply_detection_cache_after_echo_discard(self, monkeypatch): adapter = _make_signal_adapter(monkeypatch) adapter._track_sent_timestamp({"timestamp": 111222333}) - adapter._recent_sent_timestamps.discard(111222333) + # Echo suppression consumes the entry from the recent-sent ring; the + # separate reply-detection cache must still retain it. + adapter._consume_sent_timestamp(111222333) assert "111222333" in adapter._sent_message_timestamps assert adapter._quote_references_own_message("111222333", None) is True