fix(bot-relay): gateway drain root uses the same formula as the tool-side writers

_relay_root had moved to get_default_hermes_root() while tools/bot_relay and
tools/bot_mode_dm still derive the install root via bot_mode_probe._hermes_root.
For HERMES_HOME=~/.hermes/<non-profiles-subdir> the two disagreed, so the
gateway drained ~/.hermes/<relay> while message_agent wrote to
~/.hermes/<subdir>/<relay>: silent non-delivery. Both ends now share the
pre-existing writer formula; an invariant test enqueues through the writer
root and drains through the gateway handler for both home shapes.
This commit is contained in:
teknium1
2026-09-12 23:41:18 -07:00
committed by Teknium
parent 469a87f7a5
commit 6d05f7238c
2 changed files with 31 additions and 3 deletions
+5 -3
View File
@@ -20,9 +20,11 @@ method = _registry.method
def _relay_root() -> Path:
"""Install root shared by every profile (relay state is install-wide)."""
from hermes_constants import get_default_hermes_root
return get_default_hermes_root()
"""Install root shared by every profile (relay state is install-wide). Same formula as the
writers (``tools/bot_relay``, ``tools/bot_mode_dm``): both ends of the mailbox must agree for
every HERMES_HOME, including non-``profiles/`` subdirs of ``~/.hermes``."""
from tools.bot_mode_probe import _default_home, _hermes_root
return _hermes_root(Path(_default_home()))
def _run_delivery(profile: str, tmp: str, env: dict | None = None) -> subprocess.CompletedProcess: