2.7 KiB
2.7 KiB
Plan: Fix Test Suite Regressions
Objective
Restore the full test suite to a passing state after the gui_2.py refactoring (Phase 2 & Phase 3 of Context Composition Redesign).
Key Files & Context
src/gui_2.py: The main GUI entry point where methods were moved to module level.src/hot_reloader.py: Handles module registration, currently causing collisions in tests.tests/*.py: Multiple test files referencing deleted/moved methods.
Implementation Steps
Phase 1: Fix HotReloader Collisions
- Modify
src/gui_2.pyto check ifsrc.gui_2is already registered before callingHotReloader.register. This allows multipleApp()instances (common in tests) without triggeringValueError. - Revert
src/hot_reloader.pyto its original state (raisingValueErroron duplicate registration) to satisfy existing tests for that logic.
Phase 2: Fix Method Migration Regressions (Batch)
- Identify all test files calling
app._render_*or checkinghasattr(App, '_render_*'). - Use Tier 3 workers to surgically update these tests:
- Change
app._render_XYZ()togui_2.render_XYZ(app). - Change
hasattr(App, '_render_XYZ')tohasattr(gui_2, 'render_XYZ')(and importgui_2). - Note: Some internal helpers might still be prefixed with
_at the module level.
- Change
- Target the following specific files:
tests/test_ast_inspector_extended.pytests/test_discussion_takes_gui.pytests/test_gui_discussion_tabs.pytests/test_gui_fast_render.pytests/test_gui_phase4.pytests/test_gui_progress.pytests/test_gui_symbol_navigation.pytests/test_gui_synthesis.pytests/test_log_management_ui.pytests/test_mma_approval_indicators.pytests/test_mma_dashboard_streams.pytests/test_project_settings_rename.pytests/test_rag_gui_presence.pytests/test_selectable_ui.pytests/test_session_hub_merge.pytests/test_shader_live_editor.pytests/test_takes_panel.pytests/test_thinking_gui.pytests/test_token_viz.pytests/test_ui_summary_only_removal.py
Phase 3: Address Specific Logic Failures
tests/test_py_struct_tools.py: Investigate and fix why definitions are not found.tests/test_rag_phase4_final_verify.py: Investigate why RAG context is missing in history.tests/test_rag_phase4_stress.py: Investigate timing issues (incremental indexing duration).tests/test_gui_kill_button.py: Investigate missing "Actions" column in ticket queue.
Verification & Testing
- Run the full test suite using the batch script:
uv run python scripts/run_tests_batched.py. - Ensure all 243 test files pass.