hermes - 💡(How to fix) Fix scripts/run_tests.sh requires undeclared pytest-split and fails in uv venvs without pip [5 pull requests]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

/home/seedrop/.hermes/hermes-agent/venv/bin/python pytest 9.0.3 xdist ok ModuleNotFoundError: No module named 'pytest_split'

Root Cause

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.

Fix Action

Fixed

Code Example

$ 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

---

/home/seedrop/.hermes/hermes-agent/venv/bin/python
pytest 9.0.3
xdist ok
ModuleNotFoundError: No module named 'pytest_split'

---

scripts/run_tests.sh --maxfail=20 -q

---

→ installing pytest-split into /home/seedrop/.hermes/hermes-agent/venv
/home/seedrop/.hermes/hermes-agent/venv/bin/python: No module named pip
RAW_BUFFERClick to expand / collapse

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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix scripts/run_tests.sh requires undeclared pytest-split and fails in uv venvs without pip [5 pull requests]