Step 29: Operations respect targeting.

Checkpoint, Restore, and Status now skip entries that don't match the
machine's identity labels. Status reports non-matching as "skipped".
Add accepts Only/Never in AddOptions, propagated through addEntry.
6 tests covering skip/process/skipped-status/restore-skip/add-with.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-24 22:51:27 -07:00
parent 589f76c10e
commit d4d1d316db
3 changed files with 235 additions and 11 deletions

View File

@@ -37,7 +37,7 @@ func (g *Garden) MirrorUp(paths []string) error {
if lstatErr != nil {
return fmt.Errorf("stat %s: %w", path, lstatErr)
}
return g.addEntry(path, fi, now, true, false, false)
return g.addEntry(path, fi, now, true, AddOptions{})
})
if err != nil {
return fmt.Errorf("walking directory %s: %w", abs, err)