You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
session prune: a concurrent prune can abort in carryStoppedAt after the markers are gone #453
Found in the council review of PR for #431 and #434 (branch fix/431-434-prune-leftovers); the code is unchanged from main.
carryStoppedAt in packages/core/src/session-retention.ts lstats and then opens each id marker in the sessions root without handling ENOENT. When two prunes run at once, a slower one can reach carryStoppedAt after a faster one has removed the retained directory and run pruneMarkers. The marker is gone, so the slower prune throws and its whole run aborts through runReported, dropping the list of ids it had already pruned. No data is at risk: the faster prune finished the work.
Treat a marker that a concurrent prune removed as done in carryStoppedAt, as unlinkStaleFile already does
Test two concurrent prunes that interleave at that point
Activity
ElbertePlinio commentedon Oct 29, 2026
Found in the council review of PR #455.