fix: finish HERMES_HOME path cleanup

- route CLI interrupt debug logging through HERMES_HOME
- update the remaining channel_directory test to patch HERMES_HOME
  instead of Path.home()
This commit is contained in:
teknium1
2026-03-13 21:35:07 -07:00
parent 437ec17125
commit 206e56cc5e
2 changed files with 3 additions and 5 deletions

6
cli.py
View File

@@ -3684,8 +3684,7 @@ class HermesCLI:
self.agent.interrupt(interrupt_msg)
# Debug: log to file (stdout may be devnull from redirect_stdout)
try:
import pathlib as _pl
_dbg = _pl.Path.home() / ".hermes" / "interrupt_debug.log"
_dbg = _hermes_home / "interrupt_debug.log"
with open(_dbg, "a") as _f:
import time as _t
_f.write(f"{_t.strftime('%H:%M:%S')} interrupt fired: msg={str(interrupt_msg)[:60]!r}, "
@@ -3993,8 +3992,7 @@ class HermesCLI:
self._interrupt_queue.put(payload)
# Debug: log to file when message enters interrupt queue
try:
import pathlib as _pl
_dbg = _pl.Path.home() / ".hermes" / "interrupt_debug.log"
_dbg = _hermes_home / "interrupt_debug.log"
with open(_dbg, "a") as _f:
import time as _t
_f.write(f"{_t.strftime('%H:%M:%S')} ENTER: queued interrupt msg={str(payload)[:60]!r}, "

View File

@@ -203,7 +203,7 @@ class TestBuildFromSessions:
},
})
with patch.object(Path, "home", return_value=tmp_path):
with patch.dict(os.environ, {"HERMES_HOME": str(tmp_path)}):
entries = _build_from_sessions("telegram")
ids = {entry["id"] for entry in entries}