From 3c44cd0c67b5a88aa7b2846d1a5304f18334db26 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Sun, 23 Aug 2026 00:25:35 -0700 Subject: [PATCH] docs: record why the reap grace window exists in the reaper docstring Follow-up for salvaged PR #91994 -- without this note a future cleanup pass could read the age gate as dead weight. --- hermes_cli/dashboard_procs.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hermes_cli/dashboard_procs.py b/hermes_cli/dashboard_procs.py index c07e9232a3..74a950db8b 100644 --- a/hermes_cli/dashboard_procs.py +++ b/hermes_cli/dashboard_procs.py @@ -882,6 +882,13 @@ def _reap_orphaned_desktop_local_serves( by another client/machine* which legitimately sit at ppid 1 after sshd exits. Killing those is a production incident, not cleanup. - never fixed-port remote serves (e.g. ``--port 9119``) + - never a candidate younger than ``_REAP_MIN_AGE_SECONDS`` (or whose age + cannot be determined). The Desktop client writes ``backend.lock.json`` + only after the backend reports HERMES_BACKEND_READY, so during + concurrent multi-profile startup a live sibling is briefly unowned and + otherwise indistinguishable from a corpse; sparing young processes + closes that mutual-reap window. A genuine corpse merely waits for a + later scan. - best-effort; failures never raise to the caller """ import signal as _signal