From cc0931d235a1cb03403f7ef3e41372889c9006e8 Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Tue, 1 Sep 2026 03:43:21 +0530 Subject: [PATCH] test(agent): loosen brittle error/final_response equality to substring result['error'] and result['final_response'] are independently settable keys that only coincidentally share _COMPRESSION_TIMEOUT_FINAL_RESPONSE today; assert the actionable substring instead so a benign prefix or rewording does not break the terminal-contract test. --- tests/run_agent/test_compression_timeout_terminal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run_agent/test_compression_timeout_terminal.py b/tests/run_agent/test_compression_timeout_terminal.py index 9aa4dfe5ec..a858a67f14 100644 --- a/tests/run_agent/test_compression_timeout_terminal.py +++ b/tests/run_agent/test_compression_timeout_terminal.py @@ -114,7 +114,7 @@ def test_overflow_recovery_timeout_ends_turn_without_provider_reentry(): assert result["completed"] is False assert result["compression_exhausted"] is True assert "No messages were dropped" in result["final_response"] - assert result["error"] == result["final_response"] + assert "No messages were dropped" in result["error"] def test_pre_api_compression_timeout_is_typed_terminal():