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
Commit 7169173
Browse filesBrowse the repository at this point in the historyBrowse files
fix(file-safety): stop the lock-key walk at the file it lands on, and always stage a named token
resolveLockKey propagated a resolution error only out of the first
canonicalisation: a relative referent whose link parent answered EACCES was joined
onto the spelled parent, keying this writer where no writer that reached the referent
keys - two locks for one file. Only a parent that is not there (ENOENT) may fall back
to that join now.
The bounded walk also rejected a chain that landed on the file exactly at its bound,
so a peer that renames the referent away mid-EPERM-fallback made the write fail where
waiting for it would have committed. The bound now checks the terminal path once and
still rejects a ninth link; the cycle row's read count moves from 8 to 9 because the
ninth read is the terminal check that bounds it.
createStagingFilePath and createBackupFilePath took their token from
Math.random().toString(36).substring(2), which answers the empty string when
Math.random() answers 0 (measured with node 22.23.4): the name ended
`_<timestamp>_.tmp`, the one tail jsonFileRecovery cannot collect on the
underscore-anchored prefix, where the token is the only thing that attributes the name
to this target. Both writers guarantee a non-empty token now, and the dot-anchored
pattern still accepts a token-less tail because a leftover written before the
guarantee is not distinguishable from one written after it.
safeWriteText.alias.spec.ts gated every alias row on its own capability probe, so a
cmd command that quoted the directory badly answered null for the probe and skipped
the file instead of failing it; one row now asks cmd about its own directory.
CodeRabbit threads answered here: 4509550084, 4509550081, 4509550093, 4509550078.
0 commit comments