Add local CAS file roots

This commit is contained in:
Eric Wendland 2026-05-18 03:50:09 +02:00
commit e1f36ffafb
12 changed files with 581 additions and 13 deletions

View file

@ -92,8 +92,11 @@ storage. Local pin/unpin metadata is tracked in SQLite and surfaced in
`cas list`. `cas cleanup` removes unpinned local blobs while retaining pinned
blobs. The CAS crate can build deterministic tree objects that describe
directories, files, executable bits, and file blob hashes; those tree objects
are stored as CAS blobs. Iroh-blobs, providers, encrypted blobs, richer cache
policies, file roots, and sync conflict handling are future work.
are stored as CAS blobs. The daemon can register local file roots and scan them
into CAS tree objects while reporting create/update/delete/rename changes. These
scans are local metadata only and never overwrite the working tree. Iroh-blobs,
providers, encrypted blobs, richer cache policies, cross-node file roots, and
sync conflict handling are future work.
`geth-db` currently registers local SQLite paths as DB resources and reports
local-only sync status plus a read-only SQLite schema summary/hash. It also

View file

@ -351,11 +351,15 @@ and future group key evolution.
- `[x]` Tree objects are content-addressed and stored in CAS.
- `[x]` Tests cover deterministic tree hashing.
- `[ ]` File roots.
- `[~]` File roots.
Acceptance criteria:
- A file root maps a local path to a CAS tree resource.
- Scan detects create/update/delete/rename changes.
- Sync never silently overwrites local changes without a recorded decision.
- `[x]` A file root maps a local path to a CAS tree resource.
- `[x]` `geth cas root add/list/scan` persists local root metadata and latest
tree state.
- `[x]` Scan detects create/update/delete/rename changes.
- `[x]` Scan output documents that geth never overwrites file roots without a
recorded future sync decision.
- `[ ]` File roots can be synced across nodes.
- `[ ]` Conflict handling.
Acceptance criteria: