Kyzcreig
aa0289f307
fix(gateway): cap signal-driven stop drain to launchd's live ExitTimeOut
...
launchd's per-user (gui) domain clamps ExitTimeOut at 60s regardless of the
plist value (measured on macOS 26.6.1: 215->60, 90->60, 60->60, 30->30). A
gateway configured with restart_drain_timeout above that drains past the
budget and is SIGKILLed mid-teardown (adapters still connected, SQLite
checkpoint/close never runs). That unclean exit is one half of the
recurring state.db "structural corruption" class.
- gateway/restart.py: parse_launchd_exit_timeout / read_launchd_exit_timeout_s
(launchctl print gui/<uid>/<label>, bounded, fail-open None when not
launchd-owned or launchctl fails), resolve_launchd_capped_drain
(min(drain, exit_timeout - 10s cleanup reserve); never extends a drain),
effective_stop_drain_timeout (duck-typed for shutdown-path test doubles).
- gateway/run.py: read the live budget once at boot and WARN when the
configured drain exceeds it; the SIGTERM/SIGINT handler marks the stop as
signal-driven.
- gateway/run_shutdown.py: _stop_impl caps the drain, the watchdog leash and
the cron drain ceiling to the launchd budget for those stops only. In-band
SIGUSR1 restarts and --replace takeovers are not launchd-timed and keep the
configured drain. systemd/s6/foreground: unchanged (no budget -> no cap).
- hermes_cli/gateway.py: plist template ExitTimeOut 25 -> 60 so LaunchAgents
ask for the full clamp instead of a quarter of it.
2026-09-20 18:49:23 +05:30
..
2026-09-18 09:19:04 -07:00
2026-09-19 23:42:20 -07:00
2026-09-19 12:11:58 -07:00
2026-09-20 18:16:47 +05:30
2026-09-18 09:50:52 -07:00
2026-09-18 09:49:46 -07:00
2026-09-19 02:36:56 -07:00
2026-09-20 15:16:35 +05:30
2026-09-19 02:33:41 -07:00
2026-09-17 12:28:25 +05:30
2026-09-19 12:11:58 -07:00
2026-09-19 12:11:58 -07:00
2026-09-19 20:45:06 -07:00
2026-09-18 10:17:59 -07:00
2026-09-19 21:15:16 -07:00
2026-09-19 21:11:30 -07:00
2026-09-18 11:01:52 -07:00
2026-09-19 21:11:30 -07:00
2026-09-19 09:23:22 -07:00
2026-09-17 00:34:50 -05:00
2026-09-19 03:43:58 +05:30
2026-09-19 10:28:34 -07:00
2026-09-16 16:53:40 -07:00
2026-09-19 09:43:20 -07:00
2026-09-19 09:57:21 -07:00
2026-09-19 10:47:48 -07:00
2026-09-19 10:20:55 -07:00
2026-09-19 10:28:34 -07:00
2026-09-19 10:28:34 -07:00
2026-09-19 10:47:48 -07:00
2026-09-18 01:43:35 +05:30
2026-09-17 09:06:59 -07:00
2026-09-19 10:28:34 -07:00
2026-09-18 01:43:35 +05:30
2026-09-18 09:55:21 -07:00
2026-09-17 18:36:22 +05:30
2026-09-19 10:22:33 -07:00
2026-09-19 10:44:26 -07:00
2026-09-19 09:30:56 -07:00
2026-09-18 20:55:49 -07:00
2026-09-19 23:51:25 -07:00
2026-09-19 23:41:10 -07:00
2026-09-20 15:17:49 +05:30
2026-09-20 00:08:36 -07:00
2026-09-17 09:06:59 -07:00
2026-09-19 16:28:57 +05:30
2026-09-18 12:46:54 -07:00
2026-09-19 09:20:54 -07:00
2026-09-18 09:38:01 -07:00
2026-09-16 23:13:20 -04:00
2026-09-19 12:30:32 -07:00
2026-09-19 09:29:18 -07:00
2026-09-20 00:19:04 +05:30
2026-09-20 00:19:04 +05:30
2026-09-18 21:47:13 +05:30
2026-09-19 16:20:29 +05:30
2026-09-19 01:27:29 -07:00
2026-09-18 12:52:36 -07:00
2026-09-19 02:02:14 -07:00
2026-09-20 18:49:23 +05:30
2026-09-18 10:01:01 -07:00
2026-09-18 10:00:29 -07:00
2026-09-17 20:56:27 +05:30
2026-09-19 10:44:26 -07:00
2026-09-18 11:01:52 -07:00
2026-09-16 16:58:43 -07:00
2026-09-18 20:34:16 -07:00
2026-09-18 22:36:24 -07:00
2026-09-19 01:29:03 -07:00
2026-09-18 20:34:16 -07:00
2026-09-18 09:48:41 -07:00
2026-09-18 20:34:16 -07:00
2026-09-18 09:50:19 -07:00
2026-09-16 16:56:22 -07:00
2026-09-17 20:56:27 +05:30
2026-09-18 10:10:05 -07:00
2026-09-20 16:41:21 +05:30
2026-09-19 02:01:36 -07:00
2026-09-18 15:40:37 +05:30
2026-09-20 16:41:21 +05:30
2026-09-20 18:16:47 +05:30
2026-09-18 09:38:34 -07:00
2026-09-19 02:44:02 -07:00
2026-09-18 10:01:01 -07:00
2026-09-19 23:46:42 -07:00
2026-09-20 18:16:47 +05:30
2026-09-18 09:23:13 -07:00
2026-09-17 09:03:29 -07:00
2026-09-16 17:11:01 -07:00
2026-09-19 09:34:40 -07:00
2026-09-19 10:26:08 -07:00
2026-09-20 12:17:52 +05:30
2026-09-20 15:17:14 +05:30
2026-09-20 15:17:14 +05:30
2026-09-19 20:54:06 -07:00
2026-09-19 10:26:08 -07:00
2026-09-20 14:02:17 +05:30
2026-09-19 20:56:31 -07:00
2026-09-20 15:17:14 +05:30
2026-09-19 09:42:18 -07:00
2026-09-18 09:43:19 -07:00
2026-09-16 17:15:38 -07:00
2026-09-17 00:11:27 -07:00
2026-09-17 00:11:27 -07:00
2026-09-19 14:30:36 -07:00
2026-09-19 03:19:18 -07:00
2026-09-18 09:43:19 -07:00
2026-09-19 23:58:35 -07:00
2026-09-17 09:03:29 -07:00
2026-09-16 17:08:25 -07:00
2026-09-17 00:11:27 -07:00
2026-09-17 00:11:27 -07:00
2026-09-17 18:36:20 -07:00
2026-09-18 10:01:01 -07:00
2026-09-18 10:18:40 -07:00
2026-09-18 15:40:37 +05:30
2026-09-19 09:38:01 -07:00
2026-09-18 09:52:03 -07:00
2026-09-18 12:48:16 -07:00
2026-09-18 12:49:40 -07:00
2026-09-19 10:52:01 -07:00
2026-09-19 12:30:31 -07:00
2026-09-19 20:44:24 -07:00
2026-09-19 10:44:26 -07:00
2026-09-19 01:31:49 -07:00
2026-09-17 21:17:15 +05:30
2026-09-16 17:02:13 -07:00
2026-09-18 10:38:41 -07:00
2026-09-19 02:28:50 -07:00
2026-09-18 22:36:41 -07:00
2026-09-18 22:36:41 -07:00
2026-09-18 22:36:41 -07:00
2026-09-18 21:47:13 +05:30
2026-09-18 09:47:06 -07:00
2026-09-19 09:25:29 -07:00
2026-09-18 10:45:07 -07:00
2026-09-18 12:51:22 -07:00
2026-09-18 12:51:22 -07:00
2026-09-18 09:38:34 -07:00
2026-09-20 15:49:42 +05:30
2026-09-19 09:54:20 -07:00
2026-09-19 10:05:26 -07:00
2026-09-19 10:05:26 -07:00
2026-09-19 23:46:08 -07:00
2026-09-20 00:22:24 -07:00
2026-09-17 00:02:09 -07:00
2026-09-20 16:41:21 +05:30
2026-09-20 00:22:24 -07:00
2026-09-16 17:44:36 -07:00
2026-09-18 10:15:11 -07:00
2026-09-20 00:13:01 -07:00
2026-09-18 12:44:04 -07:00
2026-09-19 02:33:41 -07:00
2026-09-19 02:02:14 -07:00
2026-09-19 02:01:36 -07:00
2026-09-20 00:22:24 -07:00
2026-09-18 12:47:23 -07:00
2026-09-18 15:11:47 -07:00
2026-09-19 23:59:11 -07:00
2026-09-19 00:17:19 -07:00
2026-09-19 22:05:32 +05:30
2026-09-18 12:46:54 -07:00
2026-09-18 15:12:27 -07:00
2026-09-18 15:11:47 -07:00
2026-09-19 15:04:44 +05:30
2026-09-19 15:04:44 +05:30
2026-09-18 09:20:07 -07:00
2026-09-19 00:17:19 -07:00
2026-09-18 15:12:27 -07:00
2026-09-19 01:29:03 -07:00