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.
This commit is contained in:
Teknium
2026-08-23 00:25:35 -07:00
parent b44c2bdab2
commit 3c44cd0c67

View File

@@ -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