The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(terminal): build the profile-home fixtures under the isolated native root
kshitijk4pooradecc4024456
diff --git a/tests/tools/test_docker_session_isolation.py b/tests/tools/test_docker_session_isolation.pyindex c8710c770d9..24de30cbf10 100644--- a/tests/tools/test_docker_session_isolation.py+++ b/tests/tools/test_docker_session_isolation.py@@ -73,9 +73,11 @@ class TestSessionIsolationKeying:_disable_isolation(monkeypatch)# The default profile's home stays on the shared "default" key (a named-profile# home would take the profile path, so run from a real default root).- monkeypatch.setenv("HOME", str(tmp_path))- (tmp_path / ".hermes").mkdir()- monkeypatch.setenv("HERMES_HOME", str(tmp_path / ".hermes"))+ import hermes_constants++ root = hermes_constants._get_platform_default_hermes_home() # conftest's per-test native root+ root.mkdir(parents=True, exist_ok=True)+ monkeypatch.setenv("HERMES_HOME", str(root))assert terminal_tool._resolve_container_task_id("tui:sess-1") == "default"def test_persistent_false_keys_by_session(self, monkeypatch):diff --git a/tests/tools/test_shared_container_task_id.py b/tests/tools/test_shared_container_task_id.pyindex b2ee314d742..4c57e4cd2f3 100644--- a/tests/tools/test_shared_container_task_id.py+++ b/tests/tools/test_shared_container_task_id.py@@ -305,8 +305,9 @@ def test_shared_key_ignored_outside_persistent_docker(monkeypatch):def _use_home(monkeypatch, tmp_path, name):"""Run as a real home: ``"default"`` = the Hermes root, ``None`` = a home outside the root (whichis then its own root), anything else = ``<root>/profiles/<name>``."""- monkeypatch.setenv("HOME", str(tmp_path))- root = tmp_path / ".hermes"+ import hermes_constants++ root = hermes_constants._get_platform_default_hermes_home() # conftest's per-test native root, any OShome = root if name == "default" else tmp_path / "elsewhere" if name is None else root / "profiles" / namehome.mkdir(parents=True, exist_ok=True)monkeypatch.setenv("HERMES_HOME", str(home))@@ -471,8 +472,9 @@ def test_a_home_the_tui_stamps_custom_keys_one_container_for_every_path(monkeypafrom gateway.session_context import clear_session_vars, reset_session_vars, set_session_varsfrom tools.environments.path_utils import sanitize_task_id_for_path- monkeypatch.setenv("HOME", str(tmp_path))- home = tmp_path.joinpath(".hermes", *home_parts)+ import hermes_constants++ home = hermes_constants._get_platform_default_hermes_home().joinpath(*home_parts)home.mkdir(parents=True)monkeypatch.setenv("HERMES_HOME", str(home))_persistent_docker(monkeypatch)