From 2472793b1d707b668ddef933960d97736fc5e296 Mon Sep 17 00:00:00 2001 From: Omar Baradei Date: Sun, 5 Jul 2026 11:48:35 -0700 Subject: [PATCH] Refresh on upstream/main: resolve conflicts (no behavior change) Co-Authored-By: Claude Opus 4.8 --- .github/workflows/tests.yml | 18 ++++++++++++++++-- tests/conftest.py | 9 +++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bd398512178..353e86439ea 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -97,9 +97,18 @@ jobs: # fails if the lock is out of sync with pyproject.toml), giving a # reproducible env. It also creates .venv itself, so no separate # `uv venv` step is needed. + # + # The trailing extras beyond all/dev are the lazy-install features + # (tools/lazy_deps.py) that tests exercise for real: provider.anthropic, + # stt/tts.mistral, image.fal, terminal.modal, terminal.daytona, + # memory.hindsight, search.parallel. The hermetic test env forbids + # mid-run pip installs (HERMES_DISABLE_LAZY_INSTALLS=1 in + # tests/conftest.py), so the SDKs those tests need must be in the + # venv up front — resolved from uv.lock like everything else, which + # also honors the exact supply-chain pins these extras carry. uses: ./.github/actions/retry with: - command: uv sync --locked --python 3.11 --extra all --extra dev + command: uv sync --locked --python 3.11 --extra all --extra dev --extra anthropic --extra mistral --extra fal --extra modal --extra daytona --extra hindsight --extra parallel-web - name: Minimize uv cache # Optimized for CI: prunes pre-built wheels that are cheap to @@ -216,9 +225,14 @@ jobs: # fails if the lock is out of sync with pyproject.toml), giving a # reproducible env. It also creates .venv itself, so no separate # `uv venv` step is needed. + # + # Same extras as the test job's sync above: the hermetic test env + # forbids mid-run pip installs (HERMES_DISABLE_LAZY_INSTALLS=1 in + # tests/conftest.py), so lazy-install SDKs exercised by tests must be + # in the venv up front. uses: ./.github/actions/retry with: - command: uv sync --locked --python 3.11 --extra all --extra dev + command: uv sync --locked --python 3.11 --extra all --extra dev --extra anthropic --extra mistral --extra fal --extra modal --extra daytona --extra hindsight --extra parallel-web - name: Minimize uv cache # Optimized for CI: prunes pre-built wheels that are cheap to diff --git a/tests/conftest.py b/tests/conftest.py index 8b9488df5a5..adbd2bf8442 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -417,6 +417,15 @@ def _hermetic_environment(tmp_path, monkeypatch): # should never perform that implicit network/bootstrap path; Tirith-specific # tests opt back in by patching the security config directly. monkeypatch.setenv("TIRITH_ENABLED", "false") + # Lazy feature deps (tools/lazy_deps.py) pip-install on demand by design — + # _allow_lazy_installs() fails open for users. Unit tests must never reach + # pip/the network: with the SDK absent, any agent init whose tool checks + # touch a lazy feature (e.g. check_tts_requirements → + # ensure("tts.elevenlabs")) spawns a real pip install — which hangs to the + # suite timeout under tests that set fake proxy env vars. The kill-switch + # makes ensure() raise FeatureUnavailable immediately instead. + # tests/tools/test_lazy_deps.py overrides this var in both directions. + monkeypatch.setenv("HERMES_DISABLE_LAZY_INSTALLS", "1") # 5. Reset plugin singleton so tests don't leak plugins from # ~/.hermes/plugins/ (which, per step 3, is now empty — but the