Files
hermes-agent/tests/hermes_cli
teknium1 1038e0fc77 fix: descendant sweep spares the stopper, reports leftovers, and skips subtrees of unkillable roots
Review follow-ups on the #112631 descendant sweep:

- `_posix_descendants` excluded nothing of the caller. `hermes dashboard --stop` /
  `hermes update` run from a shell escape inside the hosted Chat TUI are same-session
  descendants of the backend, so the sweep SIGTERMed its own process mid-run (probe:
  caller in snapshot, backend SIGKILLed, "survived" line never reached) — the POSIX
  twin of the Windows #98814 hazard. The caller, its subtree and its ancestor chain are
  now pruned from the same `ps` snapshot; an ancestor's *other* children (the wedged
  TUI) stay in the sweep.
- Descendants still alive after their SIGKILL grace were silently dropped and the stop
  declared complete; they now land in `failed` so `_kill_stale_dashboard_processes`
  prints them — a wedged ui-tui still holding the deleted WAL is the incident itself.
- The Desktop boot reaper SIGKILLed descendants of roots whose own kill raised
  (EPERM: not ours), orphaning a foreign tree half-way. Descendants now carry their
  root and are skipped when the root is in `failed`. First test of that hunk.
- `_is_detached_session_leader` documents that compute_host / slash_worker children
  are exempt by the same rule and rely on their own ppid watchdogs.
2026-09-17 09:04:11 -07:00
..