The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test: preserve late retry supersession and isolate profile fixtures
Tekniumb43d865f8139
diff --git a/tests/tui_gateway/test_hosted_room_settled_retry.py b/tests/tui_gateway/test_hosted_room_settled_retry.pyindex de09fd44dfe..ce79b34798f 100644--- a/tests/tui_gateway/test_hosted_room_settled_retry.py+++ b/tests/tui_gateway/test_hosted_room_settled_retry.py@@ -16,7 +16,7 @@ def test_settled_discussion_retry_publishes_once(tmp_path, monkeypatch, later_memonkeypatch.setattr("pathlib.Path.home", lambda: tmp_path)(tmp_path / ".hermes" / "profiles" / "reviewer").mkdir(parents=True)server = SimpleNamespace(_methods={}, _sessions={}, _sessions_lock=threading.Lock())- service = HostedRoomService(server, db_path=tmp_path / "state.db")+ service = HostedRoomService(server, db_path=tmp_path / ".hermes" / "state.db")service.create_room(room_id="room", name="Room", members=[{"member_id": "worker", "profile": "default", "handle": "worker"},{"member_id": "reviewer", "profile": "reviewer", "handle": "reviewer"},@@ -64,7 +64,12 @@ def test_settled_discussion_retry_publishes_once(tmp_path, monkeypatch, later_merestarted.prepare_room(binding)events = restarted._events("room")assert sum(e["kind"] == "message.member" and e["payload"].get("text") == "Recovered answer"- for e in events) == 1+ for e in events) == (0 if later_messages else 1)+ terminal = [e for e in events if e["kind"] in {"turn.settled", "turn.cancelled"}+ and e["payload"].get("task_id") == task["identity"].task_id]+ assert len(terminal) == 1+ if later_messages:+ assert terminal[0]["payload"]["reason"] == "superseded_by_newer_user_event"assert restarted.policy_checkpoint.publication_exists(room_id="room", task_id=task["identity"].task_id, status="settled", execution_generation=2)for event_id in ("next", "after-stop"):