feat(gateway): dedicated alerts channel (#76780) - #76787
Conversation
Related to #31046 and #76780. #76787 moves home-channel lifecycle broadcasts and restart confirmation to a dedicated target, while #31046 redirects every lifecycle notification, including active-session notices. A maintainer decision is needed on that delivery contract. |
|
Thanks for the focused config-based approach; current main does route planned lifecycle broadcasts through the home channel ( Problems
Suggested changes
Automated hermes-sweeper review. |
SummarySix PRs address gateway lifecycle-notification control, but their diffs implement four distinct policies: a platform-wide toggle, suppression by channel type, a destination allowlist, and routing to a dedicated alerts target. #31046 and #76787 most directly address #76780, with different handling of active-session interruption notices. Related pull requests
Duplicates#20801 and #20892 are the same foundational toggle implementation, with #20892 being the merged salvage. #31046 and #76787 overlap on dedicated-target routing but are not strict duplicates: #31046 redirects active-session notices too, whereas #76787 preserves them; #52584 and #56015 are related filtering alternatives with different semantics. Suggested consolidationKeep #76787 open with a salvage path: preserve its focused separation of conversational home traffic from lifecycle broadcasts, then resolve the Relay provenance gap and add the requested config-loading and Relay tests before further disposition. Do not close #31046 as a duplicate while its visible keep_open review remains supported by a revised diff and the active-session routing contract is undecided; #20801 is already superseded by merged #20892, while closed #52584 and #56015 remain documented alternatives rather than candidates for reopening. Complex graphflowchart LR
classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
classDef best stroke-width:3px,stroke:#b45309
classDef target stroke-width:3px,stroke:#4338ca
I76780(["issue #76780 (open)"])
P76787["PR #76787 (open)"]
P76787 -->|best fix| I76780
class I76780 open
class P76787 open
class P76787 best
class P76787 target
click I76780 "https://github.com/NousResearch/hermes-agent/issues/76780"
click P76787 "https://github.com/NousResearch/hermes-agent/pull/76787"
Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label). Cross-PR triage: Reviewed 6 pull requests and 1 issue in this complex. Each diff was read against this issue; Assessment working set: 111 kB of PR diffs, 23 kB of issue/PR text, 22 kB of discussion (7 comments), 6 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch. |
Closes #76780
Summary
Adds a per-platform
lifecycle_chat_idconfig key that redirects gateway lifecycle (up/down/restart) notifications to a dedicated alerts channel, separate from the conversational home channel.Currently, "♻️ Gateway online", "♻ Gateway restarted" and the home-channel "Gateway shutting down / restarting" broadcasts are always sent to the platform's home channel, gated only by
gateway_restart_notification. That forces an either/or: keep the pings in the operator's primary chat (clutter) or lose the up/down visibility entirely. This PR lets operators keep the lifecycle pings while moving them to a low-noise alerts channel — cron deliveries, reminders and normal chat stay on the home channel.Behavior
lifecycle_chat_idis set for a platform, the following go there instead of the home channel:/restartconfirmation; the reply anchor is dropped since the message moves to a different chat)gateway_restart_notification.lifecycle_chat_idbut no home channel still receives the lifecycle pings.No env var — pure
config.yaml(repo convention). Bothplatforms.<name>.lifecycle_chat_idand top-level<name>.lifecycle_chat_idare supported (mirrors thegateway_restart_notificationbridge routes).Files changed
gateway/config.py— newPlatformConfig.lifecycle_chat_idfield (+to_dict/from_dict, incl. theextrabridge route) and shared-key bridging inload_gateway_configgateway/run.py— redirect logic in_send_home_channel_startup_notifications, the shutdown home-channel broadcast, and_send_restart_notificationplugins/platforms/telegram/adapter.py—lifecycle_chat_idadded to_GENERIC_MERGE_KEYSso the plugin doesn't clobber the shared-key mergetests/gateway/test_config.py— roundtrip / bridge / coercion teststests/gateway/test_restart_notification.py— redirect tests for startup, shutdown broadcast, and restart confirmation (home channel + lifecycle-only variants)website/docs/user-guide/messaging/index.md+ zh-Hans translation — "Dedicated alerts channel" sectionNotes