diff --git a/.planning/PROJECT.md b/.planning/PROJECT.md index f7628c3..8cf57fb 100644 --- a/.planning/PROJECT.md +++ b/.planning/PROJECT.md @@ -25,6 +25,10 @@ Reliable, persistent visibility into which services need updating — data never - ✓ Proper UPSERT preserving tag assignments on re-webhook — Phase 1 - ✓ Request body size limits (1MB) on webhook and API endpoints — Phase 1 - ✓ Test error handling uses t.Fatalf (no silent failures) — Phase 1 +- ✓ Store interface abstracts all persistence operations (9 methods) — Phase 2 +- ✓ Server struct replaces package-level globals (db, mu, webhookSecret) — Phase 2 +- ✓ Schema migrations via golang-migrate with embedded SQL files — Phase 2 +- ✓ Per-test in-memory databases for isolated, parallel-safe testing — Phase 2 ### Active @@ -66,7 +70,9 @@ Reliable, persistent visibility into which services need updating — data never | Decision | Rationale | Outcome | |----------|-----------|---------| | Dual DB (SQLite + PostgreSQL) | SQLite is fine for simple setups, Postgres for users who want robustness | — Pending | -| Fix SQLite bugs before adding features | Data trust is the #1 priority; features on a broken foundation waste effort | — Pending | +| Fix SQLite bugs before adding features | Data trust is the #1 priority; features on a broken foundation waste effort | ✓ Phase 1 | +| Store interface as persistence abstraction | 9 methods, no SQL in handlers; enables PostgreSQL swap without touching HTTP layer | ✓ Phase 2 | +| Server struct over package globals | Dependency injection via constructor; enables per-test isolated databases | ✓ Phase 2 | | Defer auto-grouping to future milestone | Requires research into Docker socket / DIUN metadata; don't want to slow down stability fixes | — Pending | | Defer DIUN bundling to future milestone | Significant scope; need stability and UX improvements first | — Pending | @@ -88,4 +94,4 @@ This document evolves at phase transitions and milestone boundaries. 4. Update Context with current state --- -*Last updated: 2026-03-23 after Phase 1 completion* +*Last updated: 2026-03-24 after Phase 2 completion*