From ebc1693eb19f668504ab35a4c25fe09d2e40065c Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Sat, 4 Apr 2026 11:52:00 +0200 Subject: [PATCH] docs(phase-14): add validation strategy --- .../14-postgresql-migration/14-VALIDATION.md | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 .planning/phases/14-postgresql-migration/14-VALIDATION.md diff --git a/.planning/phases/14-postgresql-migration/14-VALIDATION.md b/.planning/phases/14-postgresql-migration/14-VALIDATION.md new file mode 100644 index 0000000..6183ebc --- /dev/null +++ b/.planning/phases/14-postgresql-migration/14-VALIDATION.md @@ -0,0 +1,78 @@ +--- +phase: 14 +slug: postgresql-migration +status: draft +nyquist_compliant: false +wave_0_complete: false +created: 2026-04-04 +--- + +# Phase 14 — Validation Strategy + +> Per-phase validation contract for feedback sampling during execution. + +--- + +## Test Infrastructure + +| Property | Value | +|----------|-------| +| **Framework** | bun test | +| **Config file** | none — uses bun built-in test runner | +| **Quick run command** | `bun test tests/` | +| **Full suite command** | `bun test tests/` | +| **Estimated runtime** | ~10 seconds | + +--- + +## Sampling Rate + +- **After every task commit:** Run `bun test tests/` +- **After every plan wave:** Run `bun test tests/` +- **Before `/gsd:verify-work`:** Full suite must be green +- **Max feedback latency:** 10 seconds + +--- + +## Per-Task Verification Map + +| Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status | +|---------|------|------|-------------|-----------|-------------------|-------------|--------| +| TBD | TBD | TBD | DB-01 | integration | `bun test tests/` | ❌ W0 | ⬜ pending | +| TBD | TBD | TBD | DB-02 | integration | `bun test tests/` | ❌ W0 | ⬜ pending | +| TBD | TBD | TBD | DB-03 | integration | `bun test tests/` | ❌ W0 | ⬜ pending | +| TBD | TBD | TBD | DB-04 | integration | `bun test tests/` | ❌ W0 | ⬜ pending | +| TBD | TBD | TBD | DB-05 | smoke | `docker compose -f docker-compose.dev.yml up -d` | ❌ W0 | ⬜ pending | + +*Status: �� pending · ✅ green · ❌ red · ⚠️ flaky* + +--- + +## Wave 0 Requirements + +- [ ] `tests/helpers/db.ts` — Rewrite to use PGlite instead of bun:sqlite +- [ ] Existing test files updated from sync to async patterns + +*Test infrastructure exists but needs migration from SQLite to PGlite.* + +--- + +## Manual-Only Verifications + +| Behavior | Requirement | Why Manual | Test Instructions | +|----------|-------------|------------|-------------------| +| SQLite data migration preserves all records | DB-04 | One-time script, not automatable in CI | Run migration script against test SQLite DB, verify row counts match | +| Docker Compose starts Postgres | DB-05 | Requires Docker runtime | Run `docker compose -f docker-compose.dev.yml up -d`, verify `pg_isready` | + +--- + +## Validation Sign-Off + +- [ ] All tasks have `` verify or Wave 0 dependencies +- [ ] Sampling continuity: no 3 consecutive tasks without automated verify +- [ ] Wave 0 covers all MISSING references +- [ ] No watch-mode flags +- [ ] Feedback latency < 10s +- [ ] `nyquist_compliant: true` set in frontmatter + +**Approval:** pending