From 87db4b912f5a4a1d38757be6219cecf56d751beb Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Mon, 23 Mar 2026 21:26:47 -0700 Subject: [PATCH] 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) --- PROGRESS.md | 11 +++++++---- PROJECT_PLAN.md | 12 ++++++------ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/PROGRESS.md b/PROGRESS.md index 51b1d81..dc1b1ec 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -7,7 +7,7 @@ ARCHITECTURE.md for design details. ## Current Status -**Phase:** Step 2 complete. Ready for Step 3 (Store Package) and then Step 4. +**Phase:** Steps 2 & 3 complete. Ready for Step 4 (Garden Core). **Last updated:** 2026-03-23 @@ -17,8 +17,10 @@ ARCHITECTURE.md for design details. initialized Go module, added cobra + yaml.v3 deps, created package dirs, set up cobra root command with `--repo` flag. - **Step 2: Manifest Package** — `Manifest` and `Entry` structs with YAML tags, - `New()`, `Load(path)`, and `Save(path)` with atomic write. Tests cover - round-trip, atomic save, entry types, nonexistent file, and empty manifest. + `New()`, `Load(path)`, and `Save(path)` with atomic write. 5 tests. +- **Step 3: Store Package** — content-addressable blob store with SHA-256 keying. + `New()`, `Write()`, `Read()`, `Exists()`, `Delete()` with atomic writes, + hash validation, and two-level directory layout. 11 tests. ## In Progress @@ -26,7 +28,7 @@ ARCHITECTURE.md for design details. ## Up Next -Step 3 (Store Package), then Step 4 (Garden Core). +Step 4: Garden Core — Init and Add. Ties manifest + store together. ## Known Issues / Decisions Deferred @@ -42,3 +44,4 @@ Step 3 (Store Package), then Step 4 (Garden Core). | 2026-03-23 | — | Design phase complete. ARCHITECTURE.md and PROJECT_PLAN.md written. | | 2026-03-23 | 1 | Scaffolding complete. Old C++ removed, Go module initialized, cobra root command. | | 2026-03-23 | 2 | Manifest package complete. Structs, Load/Save with atomic write, full test suite. | +| 2026-03-23 | 3 | Store package complete. Content-addressable blob store, 11 tests. | diff --git a/PROJECT_PLAN.md b/PROJECT_PLAN.md index 09aaa19..d7364ac 100644 --- a/PROJECT_PLAN.md +++ b/PROJECT_PLAN.md @@ -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/` -- [ ] `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/` +- [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