From 8203abb9fd0bea0d41b29aa36e11f8bfabce7215 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Wed, 24 Jun 2026 13:48:33 -0400 Subject: [PATCH] test(ext-sims): fix execution_sim_live dodge by using gemini_cli mock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test was previously marked @pytest.mark.skip because it used current_provider='gemini' (the real Gemini API). With no API key, the GUI subprocess returns 'ai_status: error' after 3 consecutive errors and aborts the simulation. The 3 OTHER live tests in this file (context_sim_live, ai_settings_sim_live, tools_sim_live) all set current_provider='gemini_cli' and override gcli_path to point to tests/mock_gemini_cli.py — this REPLACES the real gemini_cli subprocess with a canned-response mock. They pass. Removed the skip decorator and applied the same pattern: - current_provider: gemini_cli (was: gemini) - gcli_path: tests/mock_gemini_cli.py (was: not set) - Removed the (unreachable) current_model setting Verification: tier-3-live_gui PASS in 602s with this test now PASSING (was: SKIPPED). --- tests/test_extended_sims.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_extended_sims.py b/tests/test_extended_sims.py index 4a911617..92981017 100644 --- a/tests/test_extended_sims.py +++ b/tests/test_extended_sims.py @@ -56,7 +56,6 @@ def test_tools_sim_live(live_gui: Any) -> None: time.sleep(2) sim.teardown() @pytest.mark.integration -@pytest.mark.skip(reason="Requires real AI provider (gemini API key); 3 consecutive error status aborts the simulation. Pre-existing flake documented in fix_test_failures_20260624. See docs/reports/TRACK_COMPLETION_fix_test_failures_20260624.md VC4 PARTIAL note.") def test_execution_sim_live(live_gui: Any) -> None: """Run the Execution & Modals simulation against a live GUI.""" client = ApiHookClient() @@ -65,8 +64,10 @@ def test_execution_sim_live(live_gui: Any) -> None: sim.setup("LiveExecutionSim") # Enable manual approval to test modals client.set_value('manual_approve', True) - client.set_value('current_provider', 'gemini') - client.set_value('current_model', 'gemini-2.5-flash-lite') + # Use gemini_cli with the mock script (same pattern as the other 3 sims + # in this file: context_sim_live, ai_settings_sim_live, tools_sim_live) + client.set_value('current_provider', 'gemini_cli') + client.set_value('gcli_path', f'"{sys.executable}" "{os.path.abspath("tests/mock_gemini_cli.py")}"') client.set_value('auto_add_history', True) sim.run() time.sleep(2)