Bug Description
scripts/run_tests.sh now requires pytest-split, but pytest-split is not declared in the project dev dependencies. If the selected Hermes dev venv was created by uv without pip, the script attempts to self-install the missing package with python -m pip and exits before running any tests because pip is unavailable.
This breaks the documented canonical test runner in a normal uv-managed development environment.
Reproduction
On current main at f2afa68a4, the selected venv is a uv-created venv:
$ read venv/pyvenv.cfg
home = /home/seedrop/.local/share/uv/python/cpython-3.11-linux-x86_64-gnu/bin
implementation = CPython
uv = 0.11.2
version_info = 3.11.15
include-system-site-packages = false
The venv has pytest/xdist but not pytest-split:
/home/seedrop/.hermes/hermes-agent/venv/bin/python
pytest 9.0.3
xdist ok
ModuleNotFoundError: No module named 'pytest_split'
Running the canonical test runner fails before pytest starts:
scripts/run_tests.sh --maxfail=20 -q
Observed output:
→ installing pytest-split into /home/seedrop/.hermes/hermes-agent/venv
/home/seedrop/.hermes/hermes-agent/venv/bin/python: No module named pip
Expected Behavior
The canonical test runner should work in the project-supported dev environment. Required test-runner dependencies should be installed by the dev dependency set, or the script should use a package-manager path that works for uv-created venvs without assuming pip is present.
Actual Behavior
The script has an undeclared runtime dependency on pytest-split and attempts an ad-hoc pip install into the venv. In uv-created venvs without pip, that bootstrap path fails immediately.
Relevant files:
scripts/run_tests.sh, lines 44-48: imports pytest_split, then runs "$PYTHON" -m pip install ... if missing.
pyproject.toml, line 57: [project.optional-dependencies].dev includes pytest/xdist but not pytest-split.
Suggested Fix
Prefer declaring pytest-split>=0.9,<1 in the dev extra so scripts/run_tests.sh does not need to install at runtime. If runtime bootstrap remains necessary, make it uv-aware or fail with a clear setup message instead of assuming pip exists.
Environment
- Repo:
NousResearch/hermes-agent
- Branch:
main
- Commit tested:
f2afa68a4
- Python: uv-managed CPython 3.11.15 venv
scripts/run_tests.sh selected venv: /home/seedrop/.hermes/hermes-agent/venv
Bug Description
scripts/run_tests.shnow requirespytest-split, butpytest-splitis not declared in the project dev dependencies. If the selected Hermes dev venv was created byuvwithout pip, the script attempts to self-install the missing package withpython -m pipand exits before running any tests because pip is unavailable.This breaks the documented canonical test runner in a normal uv-managed development environment.
Reproduction
On current
mainatf2afa68a4, the selected venv is a uv-created venv:The venv has pytest/xdist but not pytest-split:
Running the canonical test runner fails before pytest starts:
Observed output:
Expected Behavior
The canonical test runner should work in the project-supported dev environment. Required test-runner dependencies should be installed by the dev dependency set, or the script should use a package-manager path that works for uv-created venvs without assuming pip is present.
Actual Behavior
The script has an undeclared runtime dependency on
pytest-splitand attempts an ad-hocpip installinto the venv. In uv-created venvs without pip, that bootstrap path fails immediately.Relevant files:
scripts/run_tests.sh, lines 44-48: importspytest_split, then runs"$PYTHON" -m pip install ...if missing.pyproject.toml, line 57:[project.optional-dependencies].devincludes pytest/xdist but not pytest-split.Suggested Fix
Prefer declaring
pytest-split>=0.9,<1in thedevextra soscripts/run_tests.shdoes not need to install at runtime. If runtime bootstrap remains necessary, make it uv-aware or fail with a clear setup message instead of assumingpipexists.Environment
NousResearch/hermes-agentmainf2afa68a4scripts/run_tests.shselected venv:/home/seedrop/.hermes/hermes-agent/venv