Files
hermes-agent/tests
Ben Barclay 79055ee5ed fix(process): read notify-pending from live state instead of a post-exit timer
The keepalive held an owner for 60s after exit by reading retained process history. Pruning drops
that history by start time and a process cap on every spawn, so a long job lost the protection the
moment it finished; and entries closed without a collected exit (recovered PID gone, exited_at=0)
restarted the grace on every query and pinned their owner forever. Recovered entries were never
refreshed either, so a dead recovered PID read as running.

awaits_notification() now asks the three states that actually precede delivery: a notifying process
still running (via _any_running, which refreshes recovered entries outside the lock), an exit recorded
but not yet published (_completion_event unset), or an owner's event still in completion_queue. Each
ends on its own, so there is no timer to tune. Notices the poller holds after the user's Stop do not
count, since only the user's next prompt releases them.
2026-10-20 02:24:45 -07:00
..
…