fix(phase3): Resolve remaining test failures and stabilize GUI

- Fixed
ullcontext NameError in gui_2.py.
- Corrected TestMMAApprovalIndicators to call real rendering methods on mock app.
- Updated 	est_history_manager.py to provide required context_files argument to UISnapshot.
- Stabilized 	est_z_negative_flows.py with robust polling for terminal response status and corrected field names.
- Cleaned up debug logging in 
ag_engine.py and pp_controller.py.
This commit is contained in:
2026-05-14 23:13:17 -04:00
parent bee75fef52
commit c769a0ed18
5 changed files with 54 additions and 18 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ import threading
import time
import tomli_w
import typing
# from contextlib import ExitStack, nullcontext
from contextlib import ExitStack, nullcontext
from defer import defer
from imgui_bundle import imgui, hello_imgui, immapp, imgui_node_editor as ed, imgui_color_text_edit as ced
from pathlib import Path
@@ -771,7 +771,7 @@ class App:
try:
self._render_main_interface()
except Exception as e:
print(f"ERROR in _gui_func: {e}")
sys.stderr.write(f"ERROR in _gui_func: {e}\n")
traceback.print_exc()
if pushed_prior_tint:
+2 -3
View File
@@ -18,7 +18,7 @@ def _get_sentence_transformers():
from sentence_transformers import SentenceTransformer
_SENTENCE_TRANSFORMERS = SentenceTransformer
except Exception as e:
sys.stderr.write(f"[DEBUG RAG] FAILED to import sentence_transformers: {e}\n")
sys.stderr.write(f"FAILED to import sentence_transformers: {e}\n")
sys.stderr.flush()
raise e
return _SENTENCE_TRANSFORMERS
@@ -51,7 +51,7 @@ class LocalEmbeddingProvider(BaseEmbeddingProvider):
if ST:
self.model = ST(model_name)
except Exception as e:
sys.stderr.write(f"[DEBUG RAG] LocalEmbeddingProvider failed to load model {model_name}: {e}. Using dummy embeddings.\n")
sys.stderr.write(f"LocalEmbeddingProvider failed to load model {model_name}: {e}. Using dummy embeddings.\n")
sys.stderr.flush()
def embed(self, texts: List[str]) -> List[List[float]]:
@@ -108,7 +108,6 @@ class RAGEngine:
def _init_vector_store(self):
vs_config = self.config.vector_store
if vs_config.provider == 'chroma':
# Use absolute path to avoid confusion during directory cleanup/change
db_path = os.path.abspath(os.path.join(self.base_dir, ".slop_cache", "rag_chroma"))
os.makedirs(db_path, exist_ok=True)
chroma_module = _get_chromadb()