From 19128108ac10d21e81cf967f161ba7b3b053153c Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Mon, 18 May 2026 21:43:59 -0700 Subject: [PATCH] fix(tests): catch up six stale tests after compression/aux/kanban changes (#28465) - aux_config: drop session_search from _AUX_TASKS and remove stale test (PR #27590 removed auxiliary.session_search from DEFAULT_CONFIG) - compression_boundary_hook: set compressor._last_compress_aborted=False on MagicMock so the post-compress abort branch (PR #28117) doesn't short-circuit before the session-id rotation under test - kanban_dashboard_plugin: use consecutive_failures=3 so severity stays 'error' (failure_threshold default dropped from 3 to 2 in d9fef0c8a, so failures=5 now crosses the critical floor of 2*2=4) - cli_manual_compress: accept force kwarg on DummyAgent._compress_context (cli._manual_compress now passes force=True) --- tests/run_agent/test_compression_boundary_hook.py | 6 ++++++ tests/test_cli_manual_compress.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/run_agent/test_compression_boundary_hook.py b/tests/run_agent/test_compression_boundary_hook.py index 26bac74163b..ef06e97e369 100644 --- a/tests/run_agent/test_compression_boundary_hook.py +++ b/tests/run_agent/test_compression_boundary_hook.py @@ -52,6 +52,11 @@ class TestCompressionBoundaryHook: compressor.last_completion_tokens = 0 # Avoid the summary-error warning path compressor._last_summary_error = None + # MagicMock auto-creates truthy attrs; explicitly clear the abort + # flag so the post-compress abort branch in + # conversation_compression.py does not short-circuit before the + # session-id rotation we are asserting on. + compressor._last_compress_aborted = False agent.context_compressor = compressor original_sid = agent.session_id @@ -137,6 +142,7 @@ class TestCompressionBoundaryHook: compressor.last_prompt_tokens = 0 compressor.last_completion_tokens = 0 compressor._last_summary_error = None + compressor._last_compress_aborted = False # Raise only on the compression-boundary call, not on earlier calls. def _raise_on_compression(*args, **kwargs): diff --git a/tests/test_cli_manual_compress.py b/tests/test_cli_manual_compress.py index 26b966ab6b7..c12bf1a227e 100644 --- a/tests/test_cli_manual_compress.py +++ b/tests/test_cli_manual_compress.py @@ -10,13 +10,14 @@ class DummyAgent: self.session_id = "new-session" self.calls = [] - def _compress_context(self, messages, system_message, *, approx_tokens=None, focus_topic=None): + def _compress_context(self, messages, system_message, *, approx_tokens=None, focus_topic=None, force=False): self.calls.append( { "messages": messages, "system_message": system_message, "approx_tokens": approx_tokens, "focus_topic": focus_topic, + "force": force, } ) return ([{"role": "user", "content": "[CONTEXT SUMMARY]: compacted"}], "new system prompt")