docs(phase-5): add validation strategy

This commit is contained in:
2026-03-26 17:22:13 +01:00
parent f0821f062d
commit 9fe5d37f1e
@@ -0,0 +1,81 @@
---
phase: 5
slug: waveform-types-and-bank-decoupling
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-03-26
---
# Phase 5 — Validation Strategy
> Per-phase validation contract for feedback sampling during execution.
---
## Test Infrastructure
| Property | Value |
|----------|-------|
| **Framework** | Go testing (`testing` stdlib) |
| **Config file** | None — standard `go test` |
| **Quick run command** | `go test ./synth/... ./encode/...` |
| **Full suite command** | `go test ./...` |
| **Estimated runtime** | ~5 seconds |
---
## Sampling Rate
- **After every task commit:** Run `go test ./synth/... ./encode/...`
- **After every plan wave:** Run `go test ./...`
- **Before `/gsd:verify-work`:** Full suite must be green
- **Max feedback latency:** 5 seconds
---
## Per-Task Verification Map
| Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status |
|---------|------|------|-------------|-----------|-------------------|-------------|--------|
| 05-01-01 | 01 | 1 | WAVE-01 | unit | `go test ./synth/... -run TestWaveformCustomPreservesHarmonics` | ❌ W0 | ⬜ pending |
| 05-01-02 | 01 | 1 | WAVE-01 | unit | `go test ./synth/... -run TestWaveformPresetHarmonics` | ❌ W0 | ⬜ pending |
| 05-01-03 | 01 | 1 | WAVE-01 | unit | `go test ./synth/... -run TestNewBankAcceptsConfigMap` | ❌ W0 | ⬜ pending |
| 05-01-04 | 01 | 1 | WAVE-02 | unit | `go test ./synth/... -run TestBandlimitedHarmonicsNoAliasing` | ❌ W0 | ⬜ pending |
| 05-01-05 | 01 | 1 | WAVE-02 | unit | `go test ./synth/... -run TestSineRegressionVsCustomHarmonics` | ❌ W0 | ⬜ pending |
| 05-02-01 | 02 | 1 | WAVE-01+02 | unit | `go test ./synth/... -run TestMixerNoClip` | ✅ exists (update) | ⬜ pending |
| 05-02-02 | 02 | 1 | WAVE-01 | unit/smoke | `go test ./encode/...` | ✅ exists (update) | ⬜ pending |
*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*
---
## Wave 0 Requirements
- [ ] `synth/waveform_test.go` — stubs for WAVE-01 (preset harmonics correctness) and WAVE-02 (bandlimit enforcement)
- [ ] Update `synth/bank_test.go:TestNewBankHas14Layers` to use new two-argument `NewBank` signature
- [ ] Update `synth/config_test.go:TestNumLayersMatchesAllClasses` to reflect dynamic gain approach
*Existing test infrastructure covers framework and tooling — no new framework install needed.*
---
## Manual-Only Verifications
| Behavior | Requirement | Why Manual | Test Instructions |
|----------|-------------|------------|-------------------|
| Audible tonal distinction between waveforms | WAVE-01 | Subjective audio quality | Generate MP3 with each waveform type; listen and confirm distinct timbres |
| No audible aliasing or buzzing | WAVE-02 | Perceptual audio quality | Play sawtooth/square at low frequencies (65 Hz); confirm clean sound |
---
## 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 < 5s
- [ ] `nyquist_compliant: true` set in frontmatter
**Approval:** pending