Merge PR #5421: fix(format): serialise directory bundle saves with a bundle-wide lock

crates/format/src/store.rs: kept both field sets in PcraftWriter::default (main's blob_hash_cache/compressed_budget and the PR's lock_wait) and both setters (set_compressed_cache_budget, set_lock_wait).
This commit is contained in:
aiongg
2026-10-22 02:24:47 +00:00
5 changed files with 81 additions and 2 deletions
+3
View File
@@ -8,8 +8,11 @@ tiles/<blake3>.zst
blobs/<blake3>.zst
thumb.png
composite/preview.png
save.lock
```
`save.lock` exists only in directory bundles: a save holds an OS file lock on it while it writes objects, publishes the manifest and removes unreferenced objects, so concurrent saves of one bundle take turns. It is empty, and readers ignore it.
The manifest is versioned and describes the document tree. Tiles and blobs are content-addressed. Loaders verify ZIP entry bounds and CRCs; document content also uses stored hashes to detect mismatched or corrupted tile/blob content. Unsupported newer format versions fail explicitly.
## Implemented load limits