devbox/internal/hub/blobstore
shoemoney 4b6a4b97b2 harden(durability): fsync atomic writes before publishing the rename 💽
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]
2026-06-23 02:59:26 -05:00
..
blobstore.go harden(durability): fsync atomic writes before publishing the rename 💽 2026-06-23 02:59:26 -05:00
blobstore_test.go feat(M2): content-addressed BlobStore (disk CAS) 🧊 2026-06-22 23:16:51 -05:00
traversal_test.go fix(sec): block blob-hash path traversal (arbitrary file read) 🔓🛡️ 2026-06-23 02:21:03 -05:00