Files
PaperClipAI/packages
Priya RamanandPaperclip 588aebe94c fix(runner): make the ACPX sandbox root claim exclusive across processes
An aborted admission's cleanup could delete a live sandbox root when a
different admission, in the same or a different Runner process, had since
reused the same deterministic path. The in-process ownership registry could
not prove ownership across processes, since a second process always starts
with an empty registry.

Add an on-disk marker beside each sandbox root, claimed with O_CREAT|O_EXCL.
Only the admission that wins that open call gets delete authority. A later
claim for the same root is declined: it shares the root without delete
authority and never overwrites the marker. Cleanup proves ownership by
reading the marker back before every delete, and releases the marker when
the owning admission ends, so a later admission can claim the same root
after the first one closes.

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-09-03 08:12:02 +00:00
..