Skip to content

Commit 7421117

Browse files
author
caiotheodoro
committed
ci: fix joint2 cross-unit path (workspace name independent) + trust provisions knowledge venv
- trust test_joint2 walked up to a dir named 'research' — breaks on CI runners where the checkout is 'substrate'; walk up until apps/knowledge/py exists instead - python matrix: trust job provisions the knowledge venv (joint2 spawns the knowledge gate via uv run)
1 parent a523a29 commit 7421117

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,14 @@ jobs:
4343
# knowledge is a uv workspace ROOT with member packages, so its
4444
# pytest lives in a member's dev group: --all-packages is required.
4545
# trust/simulation are plain packages where --all-groups suffices.
46+
# trust's joint2 e2e spawns the knowledge gate, so it provisions
47+
# knowledge's venv too.
4648
run: >
4749
if [ "${{ matrix.unit }}" = "knowledge" ]; then
4850
uv sync --all-packages --all-groups
51+
elif [ "${{ matrix.unit }}" = "trust" ]; then
52+
uv sync --all-groups
53+
uv --directory ../knowledge/py sync --all-packages --all-groups
4954
else
5055
uv sync --all-groups
5156
fi

‎apps/trust/py/tests/test_joint2.py‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,13 @@
1919
from trust.extractors.retrieval_ladder import RetrievalLadder, LadderRung
2020

2121
PORT = 18084
22-
REPO_ROOT = Path(__file__).resolve()
23-
while REPO_ROOT.name != "research" and REPO_ROOT != REPO_ROOT.parent:
24-
REPO_ROOT = REPO_ROOT.parent
22+
# Walk up from this file until we find the monorepo root (contains
23+
# apps/knowledge/py). Works locally (dir "research") and in CI (dir
24+
# "substrate") without hardcoding the workspace name.
25+
_REPO = Path(__file__).resolve()
26+
while not (_REPO / "apps" / "knowledge" / "py").exists() and _REPO != _REPO.parent:
27+
_REPO = _REPO.parent
28+
REPO_ROOT = _REPO
2529
KNOWLEDGE_PY = REPO_ROOT / "apps/knowledge/py"
2630

2731
GATE_SERVER = f"""

0 commit comments

Comments
 (0)