--- phase: 33 slug: currency-system status: draft nyquist_compliant: false wave_0_complete: false created: 2026-04-13 --- # Phase 33 — Validation Strategy > Per-phase validation contract for feedback sampling during execution. --- ## Test Infrastructure | Property | Value | |----------|-------| | **Framework** | Bun test runner + Playwright | | **Config file** | `bunfig.toml` / `playwright.config.ts` | | **Quick run command** | `bun test` | | **Full suite command** | `bun test && bun run test:e2e` | | **Estimated runtime** | ~15 seconds (unit) + ~60 seconds (e2e) | --- ## Sampling Rate - **After every task commit:** Run `bun test` - **After every plan wave:** Run `bun test && bun run test:e2e` - **Before `/gsd-verify-work`:** Full suite must be green - **Max feedback latency:** 15 seconds --- ## Per-Task Verification Map | Task ID | Plan | Wave | Requirement | Threat Ref | Secure Behavior | Test Type | Automated Command | File Exists | Status | |---------|------|------|-------------|------------|-----------------|-----------|-------------------|-------------|--------| | 33-01-01 | 01 | 1 | D-01, D-02 | — | N/A | unit | `bun test tests/services/currency.service.test.ts` | ❌ W0 | ⬜ pending | | 33-01-02 | 01 | 1 | D-08, D-09 | — | N/A | unit | `bun test tests/services/currency.service.test.ts` | ❌ W0 | ⬜ pending | | 33-02-01 | 02 | 2 | D-01 | — | N/A | integration | `bun test tests/services/market-price.service.test.ts` | ❌ W0 | ⬜ pending | | 33-02-02 | 02 | 2 | D-04, D-05 | — | Ownership validation | integration | `bun test tests/services/community-price.service.test.ts` | ❌ W0 | ⬜ pending | | 33-03-01 | 03 | 3 | D-12, D-14 | — | N/A | unit | `bun test tests/lib/formatters.test.ts` | ❌ W0 | ⬜ pending | | 33-03-02 | 03 | 3 | D-16 | — | N/A | e2e | `bun run test:e2e --grep "currency"` | ❌ W0 | ⬜ pending | *Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky* --- ## Wave 0 Requirements - [ ] `tests/services/currency.service.test.ts` — stubs for rate fetching, caching, conversion - [ ] `tests/services/market-price.service.test.ts` — stubs for market price CRUD - [ ] `tests/services/community-price.service.test.ts` — stubs for community price submission + ownership validation - [ ] `tests/lib/formatters.test.ts` — stubs for dual display format, conversion labels *Existing test infrastructure (Bun test runner, createTestDb helper) covers framework needs.* --- ## Manual-Only Verifications | Behavior | Requirement | Why Manual | Test Instructions | |----------|-------------|------------|-------------------| | Auto-suggestion via browser locale | D-13 | Requires browser environment with locale | Open app in incognito, verify suggestion matches browser locale | | Dual display format readability | D-14 | Visual check | Verify converted prices show `€2,000 (~$2,160)` format | | Community price aggregation display | D-21 | Requires seeded community data | Seed 3+ price reports, verify "Users in DE typically pay..." display | --- ## 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 < 15s - [ ] `nyquist_compliant: true` set in frontmatter **Approval:** pending