From 7580bc66d5ce1c80bb0bb7bf60cd5f2a04447226 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Wed, 22 Jul 2026 11:18:27 -0700 Subject: [PATCH] fix(acp): align salvaged /compact wording and test with current /compress command name Main renamed the ACP slash command from /compact to /compress after #63630 was written; update the salvaged status line, comment, and behavioral test to dispatch the command that actually exists. --- acp_adapter/server.py | 4 ++-- tests/acp/test_server.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/acp_adapter/server.py b/acp_adapter/server.py index 3dfc710b1a82..cc19f855d9b2 100644 --- a/acp_adapter/server.py +++ b/acp_adapter/server.py @@ -2023,7 +2023,7 @@ class HermesACPAgent(acp.Agent): if getattr(agent, "compression_enabled", True) is False: lines.append( "Auto-compaction is disabled (compression.enabled: false); " - "/compact still compresses manually." + "/compress still compresses manually." ) else: lines.append("Tip: run /compress to compress manually before the threshold.") @@ -2052,7 +2052,7 @@ class HermesACPAgent(acp.Agent): try: agent = state.agent # No compression_enabled gate: the flag disables *automatic* - # compaction only; manual /compact must keep working (matches + # compaction only; manual /compress must keep working (matches # the CLI /compress and gateway handlers). if not hasattr(agent, "_compress_context"): return "Context compression not available for this agent." diff --git a/tests/acp/test_server.py b/tests/acp/test_server.py index c2a40d7bf056..1d9157f44fb0 100644 --- a/tests/acp/test_server.py +++ b/tests/acp/test_server.py @@ -1761,9 +1761,9 @@ class TestSlashCommands: ) mock_save.assert_called_once_with(state.session_id) - def test_compact_works_when_auto_compaction_disabled(self, agent, mock_manager): + def test_compress_works_when_auto_compaction_disabled(self, agent, mock_manager): """compression.enabled: false disables *automatic* compaction only — - manual /compact must still compress (matches CLI /compress and the + manual /compress must still compress (matches CLI /compress and the gateway handler).""" state = self._make_state(mock_manager) state.history = [ @@ -1787,7 +1787,7 @@ class TestSlashCommands: side_effect=[40, 12], ), ): - result = agent._handle_slash_command("/compact", state) + result = agent._handle_slash_command("/compress", state) assert "disabled" not in result.lower() assert "Context compressed: 4 -> 1 messages" in result