mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-28 04:02:18 +01:00
Stale-gate recovery can capture a genuinely live gate and fail to restore it, when a fresh claimant grabs the shared path first. The displaced holder's own release then found something at the shared path and unlinked it without checking whose gate it was, deleting the fresh claimant's live gate. That broke the fresh claimant's exclusivity and let a teardown overlap a live lease registration. Release now captures whatever names the shared path with the same atomic rename recovery uses, and only deletes it when its content proves it is this holder's own gate. A mismatch is restored, or, if a further claimant has since taken the path, left under a private name for its real owner to reclaim by content later. Co-authored-by: Paperclip <noreply@paperclip.ing>