feat: add opt-in gateway startup notifications - #30787
Open
vampyren wants to merge 1 commit into
Open
Conversation
Collaborator
vampyren
force-pushed
the
feat/gateway-startup-notification
branch
from
May 24, 2026 09:55
680478a to
8be7061
Compare
Contributor
Author
|
Updated the commit author to use my GitHub noreply address so contributor attribution should pass once workflows are approved. |
1 task
teknium1
reviewed
Jul 13, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the focused opt-in design. The ordinary-start gap is still present on current main: gateway/run.py:7307-7313 sends the home-channel online message only when the planned-restart marker exists.
Problems
- The new tests call the private sender directly (
tests/gateway/test_restart_notification.py:340in this PR) rather than exercising the changedGatewayRunner.start()path. They do not establish that a no-marker ordinary startup reaches the sender after configuration is loaded. - The new persistent setting has no documentation update. Existing lifecycle notification configuration is documented at
website/docs/user-guide/messaging/index.md:575-590. - Current main now has explicit planned-restart and chat-originated-restart marker handling at
gateway/run.py:7292-7313; the salvage needs to preserve those distinct paths while adding the opt-in ordinary-start case.
Suggested changes
- Add real startup lifecycle coverage for default-quiet and opt-in ordinary starts, plus marker-precedence coverage.
- Document the finalized configuration surface alongside
gateway_restart_notification.
Automated hermes-sweeper review.
| adapter.send.assert_called_once() | ||
|
|
||
|
|
||
| @pytest.mark.asyncio |
Contributor
There was a problem hiding this comment.
Please add a lifecycle-level regression that drives GatewayRunner.start() with no restart markers. Calling this helper directly does not verify that the ordinary-start branch invokes it after configuration is loaded.
1 task
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gateway_startup_notificationopt-in setting/restartfalseto avoid noisy lifecycle pings for public/end-user botsWhy
Operators may have gateways restarted externally by systemd, host backup windows, VM maintenance, or process recovery. Today the gateway can notify after Hermes-initiated
/restart, but external restarts have no.restart_notify.jsonmarker, so operators may not know when the gateway is back.Test Plan
python -m pytest tests/gateway/test_config.py tests/gateway/test_restart_notification.py -q