The core principle
Squirrel indexes content (BLAKE3 hashes), not paths. A hash ever observed must stay retrievable. Paths are observations of content; content is the entity.
When content at a path changes, the prior row is flipped to superseded and a
new row is inserted; the old hash is never rewritten in place.
squirrel query <hash> will still find a hash whose path now holds different
content.
Content is the entity
Section titled “Content is the entity”The schema makes this literal:
contentsis the append-only content entity — one row per BLAKE3, with size and origin. Contents rows are never updated, and thecontents.blake3column isUNIQUE, so the id↔hash binding is immutable by construction.filesrows are path↔content observations referencing acontentsrow.
Upsert never rewrites a row’s content_id in place: when content at a path
changes it marks the prior row superseded and inserts a new one, keeping at
most one live (non-superseded) row per path — enforced by the
uniq_files_live_per_path partial unique index.
History is never lost
Section titled “History is never lost”The runs table follows the same no-loss spirit by policy: squirrel never
auto-prunes runs — they are an audit trail, and any retention is explicit and
operator-driven.
Any feature that touches stored state (sync, prune, dedup, GC) preserves both guarantees: no deleting or overwriting history without an explicit, opt-in retention policy.
Freeing space is not a deletion
Section titled “Freeing space is not a deletion”Squirrel never propagates a delete, in either direction: removing a file locally
leaves every durable copy where it is, and sync never deletes at the
destination. That separation is what makes
squirrel offload safe rather than frightening
— it reclaims local bytes on purpose, and only after proving the content is
durable on every target the volume’s offload policy requires.
Learn more
Section titled “Learn more”- Content, not paths — the schema and migration model in depth.
- Runs & the audit trail — how runs are recorded and why they are never auto-pruned.