Add safe file-root apply

This commit is contained in:
Eric Wendland 2026-05-20 13:30:57 +02:00
commit 5c91635ea2
8 changed files with 394 additions and 14 deletions

View file

@ -133,9 +133,13 @@ pull authorized remote file-root tree metadata with `geth cas root sync <node>
remote CAS tree bytes and records a peer-qualified remote root whose path is
`remote:<node>:<name>` without applying files. File roots also participate in
the daemon background live-sync loop through authorized `cas-tree:<name>`
watermarks. The daemon also has durable local file-conflict records with
explicit resolution choices; future cross-node file sync will create those
records automatically instead of silently applying ambiguous remote changes.
watermarks. `geth cas root apply <root> --to <path>` is the first conservative
materialization path: it creates missing files and directories from the CAS tree,
does not delete extra local files, does not overwrite differing local files, and
records conflicts for manual resolution. The daemon also has durable local
file-conflict records with explicit resolution choices; future cross-node file
sync will extend those records instead of silently applying ambiguous remote
changes.
As a bootstrap network path, `geth cas fetch <node-id> <hash>` dials an
imported signed peer card over the daemon-owned Iroh control ALPN. The serving

View file

@ -519,8 +519,12 @@ and future group key evolution.
or overwriting same-named local roots.
- `[x]` Background live-sync imports updated authorized file-root trees from
sync-status `cas-tree:<name>` watermarks and stores per-peer cursors.
- `[ ]` Future completion applies file-root sync safely with conflict
detection and explicit resolution.
- `[x]` `geth cas root apply <root> --to <path>` materializes missing files
and directories from a CAS tree without deleting extras or overwriting local
edits.
- `[x]` Apply records durable conflicts for differing local paths.
- `[ ]` Future completion adds a richer three-way apply using base/local/remote
trees for automatic safe updates and deletes.
- `[~]` Conflict handling.
Acceptance criteria: