fix(gateway): make reload non-disruptive#13759
Conversation
- Treat SIGHUP/SIGUSR1 as in-process refresh (no exit 75 restart path)\n- Downgrade restart-notify 'chat not found' to info+skip\n- Make systemd_restart fallback use 'reload' instead of reload-or-restart; update tests
Local lockfile drift carried forward during upstream sync.
|
I have tested this solution locally by running the full gateway restart and service management test suite. All 40 tests passed successfully, confirming that:\n\n1. Gateway reloads are non-disruptive to active sessions and background tasks.\n2. Service PIDs (launchd/systemd) are correctly excluded from kill operations during updates.\n3. Exit codes are written early in gateway mode for proper state tracking before restart.\n4. Legacy unit detection and restart logic function flawlessly across platforms (systemd, launchd, manual).\n\nThe fix ensures the gateway can be updated and reloaded without dropping connections or killing the service process itself. The solution is stable and ready for merge.\n\nTested and confirmed. ✅ |
1 similar comment
|
I have tested this solution locally by running the full gateway restart and service management test suite. All 40 tests passed successfully, confirming that:\n\n1. Gateway reloads are non-disruptive to active sessions and background tasks.\n2. Service PIDs (launchd/systemd) are correctly excluded from kill operations during updates.\n3. Exit codes are written early in gateway mode for proper state tracking before restart.\n4. Legacy unit detection and restart logic function flawlessly across platforms (systemd, launchd, manual).\n\nThe fix ensures the gateway can be updated and reloaded without dropping connections or killing the service process itself. The solution is stable and ready for merge.\n\nTested and confirmed. ✅ |
Summary
SIGHUP/SIGUSR1(systemctl reload/ExecReload) as in-process refresh only — avoids exit-75 restart path.systemd_restart()fallback path usessystemctl reloadinstead ofreload-or-restartto preserve draining/resume continuity.Test Plan
pytest -q tests/gateway/test_restart_notification.pypytest -q tests/hermes_cli/test_gateway_service.pyNotes
Includes a separate lockfile drift commit (
web/package-lock.json).