Files
boshu a8267ddc8f feat(storage): parent-dir fsync after rename + consolidate dir-fsync (age-y9jy)
Add storage.FsyncDir — the single dir-fsync impl — and call it after the rename
in canonical storage.AtomicWriteFile, so the rename itself (not just the file
body) is durable across power loss. Every delegator (quest, cmd/ao inject,
vendorimage codexruntime, llmwiki.AtomicWriteFile) inherits it.

Close the same gap in the separate-rename writers: pool.atomicMove,
llmwiki.AtomicWriteFromReader, storage.FileStorage.atomicWrite. Dedup the 4th
private copy (evalsubstrate.WriteAtomic's fsyncDir) onto storage.FsyncDir.

FsyncDir swallows only the directory-fsync-unsupported errnos (EINVAL/ENOTSUP/
ENOTTY — macOS APFS) and propagates genuine I/O errors, not the prior
swallow-all shape that would hide a real durability failure.

Note: the bead's '3 private copies (inject/vendorimage/pool)' framing was
stale — inject and vendorimage already delegate through quest->storage; the
real remaining work was the parent-dir fsync durability gap across all rename
sites.
2026-06-26 08:31:16 -04:00
..