Steps 2 & 3 complete: manifest and store packages.

Manifest package (5 tests): Manifest/Entry structs with YAML tags,
New(), Load(), Save() with atomic write.

Store package (11 tests): content-addressable blob store keyed by
SHA-256, Write/Read/Exists/Delete with atomic writes, two-level
directory layout, hash validation.

Both implemented in parallel worktrees and merged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-23 21:26:47 -07:00
parent 4d53fb584e
commit 87db4b912f
2 changed files with 13 additions and 10 deletions

View File

@@ -30,12 +30,12 @@ Remove old C++ source files and set up the Go project.
*Can be done in parallel with Step 2.*
- [ ] `store/store.go`: `Store` struct with `root` path
- [ ] `store/store.go`: `Write(data) (hash, error)` — hash content, write to `blobs/XX/YY/<hash>`
- [ ] `store/store.go`: `Read(hash) ([]byte, error)` — read blob by hash
- [ ] `store/store.go`: `Exists(hash) bool` — check if blob exists
- [ ] `store/store.go`: `Delete(hash) error` — remove a blob
- [ ] `store/store_test.go`: write/read round-trip, integrity check, missing blob error
- [x] `store/store.go`: `Store` struct with `root` path
- [x] `store/store.go`: `Write(data) (hash, error)` — hash content, write to `blobs/XX/YY/<hash>`
- [x] `store/store.go`: `Read(hash) ([]byte, error)` — read blob by hash
- [x] `store/store.go`: `Exists(hash) bool` — check if blob exists
- [x] `store/store.go`: `Delete(hash) error` — remove a blob
- [x] `store/store_test.go`: write/read round-trip, integrity check, missing blob error
## Step 4: Garden Core — Init and Add