fix(gateway): preserve session continuity across planned restarts#11806
fix(gateway): preserve session continuity across planned restarts#11806runlvl wants to merge 4 commits into
Conversation
|
Thanks for this well-structured PR, @runlvl — the problem you identified is real and the fixes are solid. However, all four concerns addressed here have since been independently resolved on Automated hermes-sweeper review found the following implementations already merged:
Closing as |
|
Sorry for that PR, my Hermes Agent instance opened it on his own. To avoid this in the future I gave him a global rule to always check if there are already covering PRs or even a fix before opening a new PR. |
Problem
Planned gateway restarts could break conversation continuity when drain timeout was hit. Those restarts were effectively treated like unclean shutdowns, which caused active sessions to be suspended on next startup. Restart/shutdown notifications also reconstructed routes too loosely, so stale Telegram targets could produce noisy
Chat not foundfailures.Summary
Chat not foundas a controlled permanent failureValidation
pytest tests/gateway/test_clean_shutdown_marker.py -qpytest tests/gateway/test_restart_drain.py -qpytest tests/gateway/test_gateway_shutdown.py -qpytest tests/gateway/test_stuck_loop.py -qpytest tests/gateway/test_restart_notification.py -qpytest tests/gateway/test_telegram_thread_fallback.py -qpytest tests/gateway -q -k "restart_notification or restart_drain or gateway_shutdown or clean_shutdown or telegram_thread_fallback"Notes