mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 17:45:53 +01:00
The sandbox stage was the only admission step that did not retain its pending promise across an abort. When abort won the race while sandbox preparation was still in flight, nothing observed that preparation once it finally settled: a late filesystem error became an unhandled rejection, and a fully built root leaked on disk forever. Give the sandbox stage the same retained-cleanup treatment every other admission resource already gets. Each successful preparation claims exclusive, inode-identity-backed ownership of its deterministic runtime root. Retained cleanup revalidates that identity and ownership before it deletes anything, so a later admission for the same session supersedes a stale owner instead of losing its live root to a delayed delete. Add one named, bounded deadline for every wait in the host test file that follows real sandbox preparation, replacing the inherited 1000ms default that caused the original flake under load. Co-authored-by: Paperclip <noreply@paperclip.ing>