Files
PaperClipAI/packages
Priya RamanandPaperclip 653d19732c fix(runner): stop stale ACPX gate recovery from restoring a gate after its holder finishes
Recovery can capture a live replacement gate for inspection, then find its
holder already done by the time it decides to restore it. Restoring it
anyway resurrected a gate for a process that had moved on: since the
process itself stays alive, every later admission or teardown for that
root read the gate as live and hit the acquire timeout, with no recovery
path short of the process exiting.

A holder's own release now finds and removes any capture of its own gate
by content when a plain unlink finds nothing at the shared path, and
recovery's restore now treats a vanished capture as nothing left to
restore, instead of throwing. Also makes the "third claimant" regression
test poll for its expected stray count instead of taking one snapshot,
since the retry loop's own short-lived pin-and-unpin cycles against a
still-alive gate could otherwise land inside that snapshot on a loaded CI
runner.

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-09-03 13:37:47 +00:00
..