mirror of https://github.com/garrytan/gstack.git
writeSecureFileAtomic embedded only the pid in the staging filename, so two writes from the same process racing the same destination (the periodic checkpoint firing while a debounced checkpoint runs, both serialized but sharing a pid) could collide on the temp path and clobber each other's in-flight staging file before rename. Append 4 random bytes so every write gets a unique staging path. The destination still needs its own lock; this only guarantees each individual write is atomic. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| bin | ||
| scripts | ||
| src | ||
| test | ||
| PLAN-snapshot-dropdown-interactive.md | ||
| SKILL.md | ||
| SKILL.md.tmpl | ||