From dfcc10e30458634c5541a2b208f22c48bacea3e0 Mon Sep 17 00:00:00 2001 From: twentyOne2x Date: Thu, 9 Jul 2026 02:50:25 +0200 Subject: [PATCH] Fix KB proposal dashboard runtime import path --- diagnostics/kb_proposal_routes.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/diagnostics/kb_proposal_routes.py b/diagnostics/kb_proposal_routes.py index ca3c49e..7dcbf09 100644 --- a/diagnostics/kb_proposal_routes.py +++ b/diagnostics/kb_proposal_routes.py @@ -23,9 +23,13 @@ from aiohttp import web from shared_ui import render_page ROOT = Path(__file__).resolve().parent.parent -SCRIPTS_DIR = ROOT / "scripts" -if str(SCRIPTS_DIR) not in sys.path: - sys.path.insert(0, str(SCRIPTS_DIR)) +SCRIPT_DIR_CANDIDATES = [ + ROOT / "scripts", + Path(os.environ.get("TELEO_INFRA_REPO_DIR", "/opt/teleo-eval/workspaces/deploy-infra")) / "scripts", +] +for scripts_dir in SCRIPT_DIR_CANDIDATES: + if str(scripts_dir) not in sys.path: + sys.path.insert(0, str(scripts_dir)) import kb_proposal_review_packet as proposal_review # noqa: E402