Step 21: Lock/unlock toggle commands.
garden/lock.go: Lock() and Unlock() toggle the locked flag on existing tracked entries. Errors on untracked paths. Persists to manifest. cmd/sgard/lock.go: sgard lock <path>..., sgard unlock <path>... 6 tests: lock/unlock existing entry, persistence, error on untracked, checkpoint behavior changes after lock, status changes between drifted and modified after unlock. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -226,10 +226,9 @@ Depends on Steps 17, 18.
|
||||
|
||||
### Step 21: Lock/Unlock Toggle Commands
|
||||
|
||||
- [ ] `garden/garden.go`: `Lock(paths []string) error` — set `locked: true` on existing entries
|
||||
- [ ] `garden/garden.go`: `Unlock(paths []string) error` — set `locked: false` on existing entries
|
||||
- [ ] `cmd/sgard/lock.go`: `sgard lock <path>...`, `sgard unlock <path>...`
|
||||
- [ ] Tests: lock existing entry, unlock it, verify behavior changes
|
||||
- [x] `garden/lock.go`: `Lock(paths)`, `Unlock(paths)` — toggle locked flag on existing entries
|
||||
- [x] `cmd/sgard/lock.go`: `sgard lock <path>...`, `sgard unlock <path>...`
|
||||
- [x] Tests: lock/unlock existing entry, persist, error on untracked, checkpoint/status behavior changes (6 tests)
|
||||
|
||||
### Step 22: Shell Completion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user