Files
PaperClipAI/packages
Priya RamanandPaperclip efdfb1c869 fix(runner): stop a displaced ACPX recovery lock holder's release from deleting a replacement lock
A recovery lock holder's own release used a plain, unconditional unlink.
A stale-lock break can judge a still-live holder's lock stale and remove
it while that holder is still mid-recovery; a later admission can then
win a fresh lock at the same path before the first holder finishes. The
first holder's own release then deleted that live replacement, letting a
third admission win its own lock and run recovery concurrently with the
second.

Fix release to pin its own lock instance under a private path for as
long as it holds the lock, then release by that pinned identity: a match
proves it caught its own lock, safe to delete; a mismatch means a
replacement was caught by mistake, so this restores it instead.

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-09-03 17:16:07 +00:00
..