Plain POSIX files: remove commit on close (fs.rs)
Staging every write until close broke tempfile, git, and SQLite, which expect normal files. Actors that need an atomic publish write a temporary file and rename it; the SDK has write_atomic for that.
This commit is contained in:
+3
-2
@@ -39,8 +39,9 @@ actor, or a change that the agent makes to itself.
|
||||
|
||||
## Small choices
|
||||
|
||||
- **Commit on close** for new and truncated files, so readers never see half
|
||||
a file, in any language. Appends write in place, so logs stay cheap.
|
||||
- **Plain POSIX files.** An earlier version staged every write until close.
|
||||
That broke `tempfile`, git, and SQLite, which expect normal files. Atomic
|
||||
publishing is the usual temporary file + `rename`.
|
||||
- **Test first, then switch.** A new version is tested where it lies. Only
|
||||
a version that passes goes to `versions/`, and the old one runs until
|
||||
then. `versions/` keeps every version that was installed, so a rollback
|
||||
|
||||
Reference in New Issue
Block a user