A power loss between rename and the data hitting disk could leave a truncated/ empty file despite the atomic rename — breaking 'never lose a byte'. Now both atomic-write paths f.Sync() the temp file before rename and best-effort fsync the parent dir after (so the rename entry is durable too): - internal/syncer/pull.go atomicWrite (pulled file content) - internal/hub/blobstore Disk.Put (stored blobs) Dir fsync is best-effort (unsupported on Windows). [fanned-out subagent: harden-fsync] |
||
|---|---|---|
| .. | ||
| deploy_test.go | ||
| fsync_test.go | ||
| hooks_integration_test.go | ||
| preserve_ignored_test.go | ||
| pull.go | ||
| pull_test.go | ||
| restore_test.go | ||
| safejoin_test.go | ||
| syncer.go | ||
| syncer_test.go | ||