Skip to content

The agent that grows with you

fix(gateway): log the host-hint probe failure; write the boot config as UTF-8

Tekniumb807443f7e90
diff --git a/hermes_cli/gateway_profile_lifecycle.py b/hermes_cli/gateway_profile_lifecycle.py
index ac61b56edd3..491d848ca41 100644
--- a/hermes_cli/gateway_profile_lifecycle.py
+++ b/hermes_cli/gateway_profile_lifecycle.py
@@ -224,6 +224,7 @@ def _print_host_hint() -> None:
try:
pid, record = get_running_pid(), hr.read_record(hr.ROLE_GATEWAY)
except Exception:
+ logger.debug("Could not read the host record for the stop hint", exc_info=True)
return
if pid is not None and record is not None and record.pid == pid:
print(f" PID {pid} is the host gateway serving this profile; stopping it would take every "
diff --git a/tests/gateway/test_multiplex_hot_serve_live.py b/tests/gateway/test_multiplex_hot_serve_live.py
index 49b2a1f82d4..695687a2348 100644
--- a/tests/gateway/test_multiplex_hot_serve_live.py
+++ b/tests/gateway/test_multiplex_hot_serve_live.py
@@ -392,7 +392,7 @@ def test_standalone_secondary_stops_without_stopping_host(mux):
"""Positive OS ownership still permits stopping a real independent gateway."""
root, boot = mux['root'], mux['boot']
config = {**mux['config'], 'gateway': {'standalone': True, 'multiplex_profiles': False}}
- (boot / 'config.yaml').write_text(json.dumps(config))
+ (boot / 'config.yaml').write_text(json.dumps(config), encoding='utf-8')
host, desc = start_daemon(mux)
child = None
try: