Global content-addressable blob store under the reserved cas/ root.
Layout: {data_root}/cas/objects/sha256/{first_two_hex}/{rest}.
Blobs are immutable and shared across all buckets, keys, and versions. Commit is a synced atomic rename from a tmp file on the same filesystem. All functions are plain path/filesystem operations executed in the caller's process — this module deliberately has no process.
cas is a reserved name: BucketValidator rejects it as a bucket name
and ContentGC skips it when scanning the legacy bucket-local layout.
Summary
Functions
Atomically moves tmp_path into the CAS. If the blob already exists
(dedup hit), the tmp file is discarded and the existing blob is kept.
Returns a unique path inside cas/tmp/uploads/, creating the directory.
The tmp dir shares a filesystem with cas/objects/, so commit_blob/2
can rename atomically.
Re-hashes the blob file and compares against its content hash.
Functions
Atomically moves tmp_path into the CAS. If the blob already exists
(dedup hit), the tmp file is discarded and the existing blob is kept.
Returns a unique path inside cas/tmp/uploads/, creating the directory.
The tmp dir shares a filesystem with cas/objects/, so commit_blob/2
can rename atomically.
Re-hashes the blob file and compares against its content hash.