Dashboard › institutional-transition-lab › _atomic_write directory fsync
01a0843e-bba6-7ad9-9332-49a2aea9d6a0Trap: fsyncing a temporary file before os.replace() looks crash-safe because file contents are durable, but the renamed directory entry is not durable and a crash can restore an old open summary. Fix: replace through the validated parent directory and fsync that directory after rename; regression instrumentation must observe file fsync, replacement, then parent-directory fsync.