Repository navigation
v0.7.4 — trust a durable owner-pid; keep the lease authoritative
Fixes the lock-liveness model after a live-fleet incident. A job lock's recorded pid was run_lock.py's own transient CLI-subprocess pid, dead within milliseconds of acquire — so it read "dead" for every lock and was never a real liveness signal. That made "pid dead ⇒ owner crashed" a false positive, and reclaiming on it could take over a lock a still-running agent holds.
Fixed
run_lock.is_abandonedtreats a trusted, same-host owner pid (via--owner-pid) as ground truth both ways — alive ⇒ never abandoned even past its lease; dead ⇒ abandoned immediately — and otherwise makes the lease authoritative. A dead untrusted pid on an unexpired lease is no longer abandoned, soreclaim/reap/acquirecan never take over a live run's lock. Also fixes a pid-reuse false positive that could keep an expired-lease lock blocked indefinitely.
Added
acquire/reclaimaccept--owner-pid <pid>; the owner recordspid_trusted: trueand a crashed run becomes reclaimable before its lease expires.tokenstill derives from run_lock's own pid (unique per acquisition). Omit → lease governs (backward-compatible). Not wired into the managed block by default: a per-command$$is not durable and would re-arm the bug; activation needs a long-lived owner pid.
Verification
All four suites green on Python 3.11 and 3.12: lifecycle 80, optimizer 48, state 184, digest 44 — 0 failed.