diff --git a/src/app_controller.py b/src/app_controller.py index 86d405b6..2a426b33 100644 --- a/src/app_controller.py +++ b/src/app_controller.py @@ -3393,8 +3393,14 @@ class AppController: # Reset RAG engine state so the chroma collection from a prior test # doesn't leak into the next session. The next _sync_rag_engine will # rebuild the engine with the new active_project_root. + # NOTE: rag_config is reset to a fresh default (not None) so the rag_* + # setters can still mutate it. Setting it to None was a bug — setters + # check `if self.rag_config:` and become no-ops, leaving the engine + # unsynced forever (test_rag_phase4_final_verify regression on + # 2026-06-10). self.rag_engine = None - self.rag_config = None + from src import models as _rag_models + self.rag_config = _rag_models.RAGConfig() self.rag_status = 'idle' self._rag_sync_token = 0 self._rag_sync_dirty = False