Step 8: Polish — lint, clock abstraction, e2e test.

- golangci-lint config with errcheck, govet, staticcheck, errorlint
- Fix all lint issues (unchecked error returns in cleanup paths, De Morgan)
- Inject jonboulle/clockwork into Garden for deterministic timestamps
- Add manifest.NewWithTime() for clock-aware initialization
- E2e lifecycle test: init → add → checkpoint → modify → status → restore → verify
- Update CLAUDE.md, PROJECT_PLAN.md, PROGRESS.md

Phase 1 (local) is now complete. All 9 CLI commands implemented and tested.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-23 22:03:53 -07:00
parent 08e24b44e0
commit d1a6e533a4
11 changed files with 200 additions and 37 deletions

View File

@@ -7,7 +7,7 @@ ARCHITECTURE.md for design details.
## Current Status
**Phase:** Steps 17 complete. Ready for Step 8 (Polish).
**Phase:** Phase 1 complete (Steps 18). All local commands implemented.
**Last updated:** 2026-03-23
@@ -33,6 +33,8 @@ ARCHITECTURE.md for design details.
- **Step 7: Remaining Commands** — Remove (2 tests), Verify (3 tests), List
(2 tests), Diff (3 tests). Each in its own file to enable parallel
development. All CLI commands wired up.
- **Step 8: Polish** — golangci-lint config, all lint issues fixed, clockwork
clock abstraction injected into Garden, e2e lifecycle test, docs updated.
## In Progress
@@ -40,7 +42,7 @@ ARCHITECTURE.md for design details.
## Up Next
Step 8: Polish (golangci-lint, clock abstraction, e2e test, doc updates).
Phase 1 is complete. Future work: blob durability, gRPC remote mode.
## Known Issues / Decisions Deferred
@@ -48,9 +50,8 @@ Step 8: Polish (golangci-lint, clock abstraction, e2e test, doc updates).
replication is deferred to a future phase.
- **gRPC remote mode**: Phase 2. Package structure is designed to accommodate
it (garden core separates logic from CLI wiring).
- **Clock abstraction**: Inject a clock interface (e.g. `jonboulle/clockwork`)
into Garden instead of calling `time.Now()` directly. Improves timestamp
test determinism. Deferred to Step 8 (Polish).
- **Clock abstraction**: Done — `jonboulle/clockwork` injected. E2e test
uses fake clock for deterministic timestamps.
## Change Log
@@ -64,3 +65,4 @@ Step 8: Polish (golangci-lint, clock abstraction, e2e test, doc updates).
| 2026-03-23 | 5 | Checkpoint and Status complete. Re-hash, store changed blobs, status reporting. 4 tests. |
| 2026-03-23 | 6 | Restore complete. Selective paths, force/confirm, timestamp logic, symlinks, permissions. 6 tests. |
| 2026-03-23 | 7 | Remaining commands complete. Remove, Verify, List, Diff — 10 tests across 4 parallel units. |
| 2026-03-23 | 8 | Polish complete. golangci-lint, clockwork, e2e test, doc updates. |