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
withHumanDecisionsLock checks the lock's mtime via lstatSync (lines 726-727) then unconditionally rmSyncs the lock path (line 733) with no revalidation between the two. A concurrent writer that acquires a fresh lock (new mtime) between check and unlink has its lock deleted, letting two writers enter the critical section concurrently — a lost-update risk on human-decisions.json via the read-stamp-write race.
Suggested fix (from review): a re-stat or inode comparison before the unlink closes the window.
Activity