From aa0289f307e80deb425348fa110facd8e76a324d Mon Sep 17 00:00:00 2001 From: Kyzcreig <9063726+Kyzcreig@users.noreply.github.com> Date: Sat, 19 Sep 2026 17:00:15 -0700 Subject: [PATCH] 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//