The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(gateway): log the foreign-standalone-owner warning once per start
kshitijk4poor78fbbb05577f
diff --git a/gateway/host_attach.py b/gateway/host_attach.pyindex 201649ae06b..070c970f778 100644--- a/gateway/host_attach.py+++ b/gateway/host_attach.py@@ -381,9 +381,10 @@ def decide(our_home: Path, *, replace: bool = False) -> HostAttachDecision:if attached is not None and attached.standalone:# One-process-per-profile fleet: the owner is another profile's standalone gateway. Refusing# here exits 78, which every supervisor treats as permanent — on a launchd fleet that parked- # every unit but the first to claim the host lock. Start beside it; the host-lock claim logs- # the topology and the `gateway migrate --multiplex` path stays the way to converge.- logger.warning(+ # every unit but the first to claim the host lock. Start beside it. decide() runs twice per+ # start (CLI guard + start_gateway), so this is INFO; the host-lock claim in run.py logs the+ # one WARNING with the `gateway migrate --multiplex` converge hint.+ logger.info("Another profile's standalone gateway owns this host (%s); starting profile '%s' beside it. ""Fold every profile onto one gateway with: hermes gateway migrate --multiplex",attached.describe(), profile)diff --git a/tests/gateway/test_host_attach_lifecycle.py b/tests/gateway/test_host_attach_lifecycle.pyindex 9a471aa6d64..54feadae46d 100644--- a/tests/gateway/test_host_attach_lifecycle.py+++ b/tests/gateway/test_host_attach_lifecycle.py@@ -159,7 +159,7 @@ def test_a_standalone_owner_is_the_per_profile_topology_not_a_refusal(tmp_path,monkeypatch.setattr("gateway.control_socket.rescan_gateway_profiles",lambda home, timeout=8.0: {"multiplex": False, "served_profiles": ["tank"]})- with caplog.at_level("WARNING", logger="gateway.host_attach"):+ with caplog.at_level("INFO", logger="gateway.host_attach"):assert host_attach.decide(tmp_path / "root" / "profiles" / "nous").outcome == host_attach.STARTassert any("migrate --multiplex" in r.getMessage() for r in caplog.records), "the converge hint is logged"assert asyncio.run(gateway_run._host_attach_or_none(replace=False)) is None