From 75785ae918a4a0e19e458d883b50b2940c05d514 Mon Sep 17 00:00:00 2001 From: KoalaTrapLord <265133236+KoalaTrapLord@users.noreply.github.com> Date: Sun, 29 Mar 2026 20:39:37 -0400 Subject: [PATCH] fix(tests): update RESPONSE_PHASES assertion to match current turn_manager design MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit begin_combat/end_combat are dispatched as named priority windows inside _phase_combat(), not as entries in RESPONSE_PHASES. The constant is correctly {"upkeep", "end_step"} — test was asserting stale intent. --- tests/sim/test_turn_phases.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/sim/test_turn_phases.py b/tests/sim/test_turn_phases.py index bd9078a..0104cd4 100644 --- a/tests/sim/test_turn_phases.py +++ b/tests/sim/test_turn_phases.py @@ -510,6 +510,13 @@ class TestTurnManagerPhaseCompat: assert ACTION_PHASES == {"main1", "main2"} def test_turn_manager_response_phases(self): - """RESPONSE_PHASES should be upkeep, begin_combat, end_combat, end_step.""" + """RESPONSE_PHASES contains the instant-speed windows dispatched via _apnap_priority_window. + + begin_combat and end_combat are handled as named calls inside _phase_combat() + directly -- they are NOT in RESPONSE_PHASES. Only upkeep and end_step + are dispatched through the generic APNAP window in _run_player_turn(). + """ from commander_ai_lab.sim.turn_manager import RESPONSE_PHASES - assert RESPONSE_PHASES == {"upkeep", "begin_combat", "end_combat", "end_step"} + assert RESPONSE_PHASES == {"upkeep", "end_step"} + assert "begin_combat" not in RESPONSE_PHASES + assert "end_combat" not in RESPONSE_PHASES