The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(tui_gateway): pin the CompressionBusy race in the /compress core
kshitijk4poor1369085be4d5
diff --git a/tests/tui_gateway/test_busy_compression_demotion.py b/tests/tui_gateway/test_busy_compression_demotion.pyindex b5d93d421ce..3f0e01cddf6 100644--- a/tests/tui_gateway/test_busy_compression_demotion.py+++ b/tests/tui_gateway/test_busy_compression_demotion.py@@ -14,6 +14,8 @@ from __future__ import annotationsimport threadingimport types+import pytest+from tui_gateway import server@@ -222,6 +224,8 @@ def test_submit_during_manual_compress_is_queued_and_reply_persists(monkeypatch)assert second["error"]["code"] == 4009# tools.configure rebuilds the agent (history_version bump): refused before it reads the actionassert server._methods["tools.configure"]("r4", {"session_id": "sid"})["error"]["code"] == 4009+ with pytest.raises(server.CompressionBusy): # the /compress + slash-mirror core: a typed busy, not a failure+ server._compress_live_with_feedback("sid", session, agent, "", snapshot_kwargs=True)# "/compress --aggressive" never touches history: answered without claiming (or draining) the busy sessionassert server._compress_live_with_feedback("sid", session, agent, "--aggressive", snapshot_kwargs=True) == \ccm.AGGRESSIVE_UNSUPPORTED