Files
hermes-agent/apps
cez0060405 bb319d0d78 fix(desktop): bound orphan-reap sweep so slow probes cannot stall boot
The ownership file accumulates one record per profile per launch, and each
record can cost up to two identity probes (parent + backend) plus a stop.
On Windows those shell out to PowerShell, whose 5.1 cold starts are slow.
Without a bound, a large roster could stall boot for minutes while the
renderer's 45s backend-boot budget expires and the user stares at the
connecting screen.

- Add REAP_PROBE_TIMEOUT_MS (5s) for the orphan-reap path; the claim path
  keeps the full 30s headroom for a freshly spawned backend's marker.
- Add reapDeadlineMs (5s default) as an overall budget for one reap sweep;
  when exhausted, unprocessed records are preserved for the next launch.
- stopOwnedBackend now throws when the identity probe fails (not confirmed
  gone) so the record is preserved instead of leaking the backend.

Verified: two cold starts complete in ~29s (was 5+ min); renderer connects
immediately after backend ready.
2026-09-03 12:17:54 +05:30
..