Skip to content

The agent that grows with you

test: give bare profile-dir fixtures an identity marker (#113377 red-fix, pass 2)

teknium1693430d010fd
diff --git a/tests/hermes_cli/test_web_server.py b/tests/hermes_cli/test_web_server.py
index f035b483b22..7aaca323e55 100644
--- a/tests/hermes_cli/test_web_server.py
+++ b/tests/hermes_cli/test_web_server.py
@@ -771,6 +771,7 @@ class TestWebServerEndpoints:
worker_home = profiles_mod.get_profile_dir("worker")
worker_home.mkdir(parents=True)
+ (worker_home / "config.yaml").touch() # identity marker: bare dirs are not profiles
seen = {}
@@ -1893,6 +1894,7 @@ class TestWebServerEndpoints:
default_home = get_hermes_home()
worker_home = profiles_mod.get_profile_dir("worker")
worker_home.mkdir(parents=True)
+ (worker_home / "config.yaml").touch() # identity marker: bare dirs are not profiles
assert self.client.post(
"/api/providers/custom-endpoints?profile=worker",
diff --git a/tests/tools/test_bot_retry_policy.py b/tests/tools/test_bot_retry_policy.py
index c623bfbb16a..a7e800abfa7 100644
--- a/tests/tools/test_bot_retry_policy.py
+++ b/tests/tools/test_bot_retry_policy.py
@@ -66,6 +66,7 @@ def test_every_reason_has_a_defined_action():
def home(tmp_path, monkeypatch):
h = tmp_path / ".hermes"
(h / "profiles" / "ops").mkdir(parents=True)
+ (h / "profiles" / "ops" / "config.yaml").touch() # identity marker: bare dirs are not profiles
monkeypatch.setenv("HERMES_HOME", str(h))
return h
diff --git a/tests/tools/test_bot_turn_lock.py b/tests/tools/test_bot_turn_lock.py
index 1b02ae6febf..0291326df88 100644
--- a/tests/tools/test_bot_turn_lock.py
+++ b/tests/tools/test_bot_turn_lock.py
@@ -267,6 +267,7 @@ def test_relay_deliver_returns_target_busy_error(tmp_path, monkeypatch):
h = tmp_path / "h"
(h / "profiles" / "ops").mkdir(parents=True)
+ (h / "profiles" / "ops" / "config.yaml").touch() # identity marker: bare dirs are not profiles
monkeypatch.setenv("HERMES_HOME", str(h))
monkeypatch.setattr(bot_relay, "turn_wait_seconds", lambda: 0.2)
@@ -317,6 +318,7 @@ def test_relay_deliver_serializes_then_succeeds(tmp_path, monkeypatch):
h = tmp_path / "h"
(h / "profiles" / "ops").mkdir(parents=True)
+ (h / "profiles" / "ops" / "config.yaml").touch() # identity marker: bare dirs are not profiles
monkeypatch.setenv("HERMES_HOME", str(h))
monkeypatch.setattr(bot_relay, "turn_wait_seconds", lambda: 5.0)
diff --git a/tests/tui_gateway/test_relay_live_author.py b/tests/tui_gateway/test_relay_live_author.py
index a272e47fcf4..0b109f03373 100644
--- a/tests/tui_gateway/test_relay_live_author.py
+++ b/tests/tui_gateway/test_relay_live_author.py
@@ -60,6 +60,7 @@ def turn_env(monkeypatch, tmp_path):
def test_live_relay_stamps_the_sender_as_a_delivery_author(tmp_path, monkeypatch):
home = tmp_path / ".hermes"
(home / "profiles" / "ops").mkdir(parents=True)
+ (home / "profiles" / "ops" / "config.yaml").touch() # identity marker: bare dirs are not profiles
monkeypatch.setenv("HERMES_HOME", str(home))
submitted = []
monkeypatch.setitem(srv._methods, "prompt.submit", lambda rid, p: submitted.append(p) or srv._ok(rid, {"status": "streaming"}))