diff --git a/tests/test_rag_engine_ready_status_bug.py b/tests/test_rag_engine_ready_status_bug.py index 211e3d7b..b6086750 100644 --- a/tests/test_rag_engine_ready_status_bug.py +++ b/tests/test_rag_engine_ready_status_bug.py @@ -60,12 +60,17 @@ def test_rag_status_remains_error_after_sync_failure() -> None: status to 'ready' - a lie. """ from src.app_controller import AppController + import threading # Construct a controller, bypassing the full __init__ ctrl = AppController.__new__(AppController) ctrl.rag_config = MagicMock() ctrl.rag_config.enabled = True ctrl.rag_engine = None ctrl.files = [] + # Phase 4 coalescing state (added by test_infrastructure_hardening_20260609) + ctrl._rag_sync_token = 0 + ctrl._rag_sync_dirty = False + ctrl._rag_sync_lock = threading.Lock() # Use a mock io_pool to capture the _task function submitted_tasks = [] class MockFuture: