79 lines
2.5 KiB
Markdown
79 lines
2.5 KiB
Markdown
---
|
||
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: <20><> 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 `<automated>` 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
|