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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user