Add three-way file root apply

This commit is contained in:
Eric Wendland 2026-05-22 14:41:09 +02:00
commit 606641dd4a
5 changed files with 602 additions and 27 deletions

View file

@ -232,8 +232,12 @@ against the current local same-named root and the newly imported remote tree.
Concurrent edit, delete/edit, and divergent rename conflicts are recorded in
the local conflict table for later resolution.
`geth cas root apply <root> --to <path>` can then materialize that tree locally:
it creates missing directories/files, never deletes extra files, never
overwrites differing local files, and records conflicts for manual resolution.
without a registered local root base it creates missing directories/files, never
deletes extra files, never overwrites differing local files, and records
conflicts for manual resolution. When the target path is a registered local file
root with a previous scan, apply uses a three-way base/local/remote check and
can safely apply non-conflicting remote creates, updates, deletes, and renames
only where local state still matches the recorded base.
Named KV stores participate in the same live-sync loop once they exist locally:
manual `geth kv sync <node-id> <name>` and background ticks require `kv.read`
on the remote `resource:kv:<name>` and import only remote entries that are not