Skip to content

fix(gateway): restart through launchd supervision#34230

Open
chrometh wants to merge 1 commit into
NousResearch:mainfrom
chrometh:fix/launchd-gateway-restart
Open

fix(gateway): restart through launchd supervision#34230
chrometh wants to merge 1 commit into
NousResearch:mainfrom
chrometh:fix/launchd-gateway-restart

Conversation

@chrometh

Copy link
Copy Markdown

Summary

  • detect launchd-managed gateway processes during /restart
  • route restarts through service-manager exit/relaunch instead of detached helpers
  • mark launchd plists with HERMES_GATEWAY_SERVICE_MANAGER=launchd and bootstrap unloaded jobs before self-signalling

Test Plan

  • PYTHONPATH="$PWD" python -m pytest tests/gateway/test_restart_notification.py tests/hermes_cli/test_gateway.py -q -o 'addopts='\n- also passed combined local patch suite: 131 tests

Detect launchd-managed gateway processes during /restart and route restarts through the service manager instead of detached helpers. Bootstrap unloaded launchd jobs before self-signalling so macOS restarts do not strand the gateway.
@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists labels May 29, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Competes with open PRs #19940, #24898, #33393, #33020, #27691 for the same launchd restart detection gap. Merged fix #28341 addresses part of this. See #11932 for the canonical issue.

@Jadoking

Jadoking commented May 29, 2026

Copy link
Copy Markdown

I tested #34230 on an affected macOS launchd machine. It fixes the service-manager detection/plist marker, but the early return after graceful SIGUSR1 still stranded launchd as loaded but not running with last exit code = 75: EX_TEMPFAIL.

I opened #34366 with the extra regression + follow-up behavior: after graceful drain, continue to launchctl kickstart -k so the restart is deterministic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants