Files
hermes-agent/gateway/relay
Ben Barclay f16a54bf7c fix(relay): treat the "relay" placeholder as an unresolved ack lane
Review caught the fallback never firing. `_event_from_wire` maps an
absent OR unknown wire platform to `Platform.RELAY`, so an unresolved
lane arrives as the truthy string "relay", never as "". Testing only for
"" made the chat-lane and descriptor fallbacks dead code: a
Telegram-primary gateway whose connector did not stamp the platform
still got ✅ and still failed.

Check each candidate in turn — event platform, the chat's inbound lane,
then the descriptor's primary — skipping "" and "relay", since any of
them can hold the placeholder. Reading the lane straight from
`_platform_by_chat` rather than `_chat_platform` matters too: that
helper folds in the descriptor itself, so a cached "relay" would shadow
a real primary platform.

The replaced test asserted on `platform=None`, a state the wire cannot
produce, which is why it passed while the path was broken. The new ones
build events through `_event_from_wire` for absent, explicit-"relay" and
unknown platforms, cover chat-lane precedence over a different primary,
and keep ✅ for a genuinely relay-primary gateway.
2026-09-22 15:52:23 +05:30
..
…
…