mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-21 10:22:18 +00:00
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.
This commit is contained in:
parent
332f88f6a6
commit
2f86283217
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue