fix(reliability): clear boot marker on graceful shutdown (I1)

This commit is contained in:
2026-08-22 16:51:33 -06:00
parent 027646c905
commit ba3e1b1ae0
2 changed files with 56 additions and 0 deletions
@@ -5106,6 +5106,17 @@ def check_boot_marker():
return False
def _clear_boot_marker():
"""Best-effort: a clean shutdown must not read as an unexpected reboot."""
marker = globals().get('BOOT_MARKER')
if not marker:
return
try:
os.unlink(marker)
except Exception:
pass
def startup_env_check(attempts=STARTUP_CHECK_ATTEMPTS,
delay=STARTUP_CHECK_DELAY):
"""Run and print the startup contract, allowing boot dependencies time.
@@ -7143,6 +7154,10 @@ def _request_shutdown(signum=None, frame=None):
LIVE_STOP.set()
HEALTH_STOP.set()
_recon_hopper_stop.set()
try:
_clear_boot_marker()
except Exception:
pass
def _uci_iface_present(name):