Files
hermes-agent/tests
teknium1 105568c155 fix(review): a live cross-home gateway.pid is still unlinked on refusal; the held lock stays
Dropping the `expected_home is None` clause from the unscoped cleanup branch of
`get_running_pid` re-opened the #89315 poison-file class: a live pid record whose
`hermes_home` names ANOTHER home sat behind a held lock forever and
`tests/hermes_cli/test_cross_profile_kill_refusal.py` went red (the only red in
the PR's Python tests job).

The two rejections are now distinct. A SAME-home record the cmdline matcher
rejects keeps both files (#125610: a dashboard poll must not unlink a live
gateway's pid/lock). A record whose recorded home CONFLICTS with the process
home unlinks the poisoned gateway.pid, never the held gateway.lock
(`_cleanup_invalid_pid_path(unlink_lock=False)`). Scoped polls keep the #106406
contract: nothing is unlinked while a PID is live.

The #89315 test is unchanged; the new invariant test asserts the split (pid
gone, lock kept) and was red on the PR head.
2026-09-28 05:58:01 -07:00
..