mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 17:45:53 +01:00
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>