Files
hermes-agent/tests
teknium1 163ecaebff test(conftest): relocate pytest's basetemp when it sits inside the operator's Hermes home
Every per-test sandbox is <basetemp>/.../hermes_test, and get_default_hermes_root() prefers
the platform-native home whenever HERMES_HOME sits under it. A basetemp inside ~/.hermes
(pytest --basetemp, or TMPDIR/TEMP pointing there — the default on Windows, where the home is
%LOCALAPPDATA%\hermes) therefore turned every sandbox back into the live install, and any
test that resolves the default profile wrote fixtures over the operator's config.yaml, .env
and MEMORY.md.

Hook into pytest_configure after _pytest.tmpdir has built the TempPathFactory and move a
basetemp that resolves under the native home to a fresh tempdir outside it (falling back to
the repo's ignored .pytest_cache when the system temp dir is itself inside the home). The
fix lives at the basetemp seam so it covers every test, not only the two writers in
test_profiles.py, and needs no per-test fixture or opt-out marker.

Fixes #111101
2026-09-15 05:24:39 -07:00
..
…