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.
This commit is contained in:
kshitijk4poor
2026-09-01 03:43:21 +05:30
committed by kshitij
parent 1e8f6a0491
commit cc0931d235

View File

@@ -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():