rivox 1.0.0

Universal polyglot build coordination layer for Python, Rust, and Node monorepos
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Content-Addressed Storage (CAS) Specification

Rivox CAS (`LocalCas`) manages artifact storage under `~/.rivox/cache/cas`.

---

## 2-Level Fanout & Merkleized Directory Manifests (RFC-002)

Because operating system kernels (Linux, macOS, Windows) reject directory hard-linking with `EISDIR`, Rivox represents directory artifacts using Merkleized directory manifest trees (`TreeManifest`):

1. **File Blob Storage**: Stored at `~/.rivox/cache/cas/blobs/ab/cd/<hash>` using 2-level directory fanout to prevent ext4 directory lock overhead.
2. **Tree Manifest Storage**: Stored at `~/.rivox/cache/cas/trees/ab/cd/<tree_key>` as a canonical JSON array of relative file paths, file modes, and file blob hashes.
3. **Zero-Copy Reconstitution**: Restoring a directory artifact creates subdirectories and hard-links individual file blobs into the destination target path.

See also: [cache.md](cache.md), [internals.md](internals.md).