Live-sync authorized file roots

This commit is contained in:
Eric Wendland 2026-05-20 13:26:50 +02:00
commit bab13cc0a1
5 changed files with 128 additions and 7 deletions

View file

@ -131,8 +131,9 @@ scans are local metadata only and never overwrite the working tree. A peer can
pull authorized remote file-root tree metadata with `geth cas root sync <node>
<name>` when it has `cas.fetch` on `resource:cas-tree:<name>`; sync imports the
remote CAS tree bytes and records a peer-qualified remote root whose path is
`remote:<node>:<name>` without applying files. The daemon also has durable local
file-conflict records with
`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.
@ -235,7 +236,10 @@ authorization testing: non-owner subjects must hold `ssh_cert.*` capabilities on
`resource:ssh:revocations` before requests, approval/import/read operations, or
revocation publish/read/import operations
are accepted. The live-sync loop first asks for authorized stream watermarks and
skips module pulls whose remote high-water value has not advanced.
skips module pulls whose remote high-water value has not advanced. File-root
live-sync uses only sync-status-advertised `cas-tree:<name>` streams, because
the local node otherwise does not know which roots the peer is willing to
expose.
## Keychain, Auth, And Secrets

View file

@ -517,6 +517,8 @@ and future group key evolution.
- `[x]` Sync imports CAS tree bytes and records a peer-qualified remote root
with path `remote:<node>:<name>` without writing files into the working tree
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.