Skip to content

The agent that grows with you

refactor(state): drop redundant isinstance guard in _lock_holder_provably_dead (except path already fails closed)

Tekniumc36d8a692e35
diff --git a/hermes_state_common.py b/hermes_state_common.py
index 8470f27d3ba..376a79512f6 100644
--- a/hermes_state_common.py
+++ b/hermes_state_common.py
@@ -743,8 +743,6 @@ def _clear_lock_holder_record(handle) -> None:
def _lock_holder_provably_dead(record) -> bool:
"""True ONLY when the recorded holder is provably dead or PID-recycled. Anything indeterminate
(no/malformed record, PID owned by another user, /proc unavailable) is False: FAIL CLOSED and defer."""
- if not isinstance(record, dict):
- return False
try:
pid = int(record["pid"])
except (KeyError, TypeError, ValueError):