diff --git a/.planning/phases/03-pipeline-integration-and-mvp/03-VALIDATION.md b/.planning/phases/03-pipeline-integration-and-mvp/03-VALIDATION.md new file mode 100644 index 0000000..d065d1c --- /dev/null +++ b/.planning/phases/03-pipeline-integration-and-mvp/03-VALIDATION.md @@ -0,0 +1,81 @@ +--- +phase: 3 +slug: pipeline-integration-and-mvp +status: draft +nyquist_compliant: false +wave_0_complete: false +created: 2026-03-26 +--- + +# Phase 3 — Validation Strategy + +> Per-phase validation contract for feedback sampling during execution. + +--- + +## Test Infrastructure + +| Property | Value | +|----------|-------| +| **Framework** | Go standard `testing` package | +| **Config file** | none — `go test ./...` convention | +| **Quick run command** | `go test ./classify/... ./synth/... ./cmd/... -count=1` | +| **Full suite command** | `go test ./... -count=1` | +| **Estimated runtime** | ~5 seconds | + +--- + +## Sampling Rate + +- **After every task commit:** Run `go test ./classify/... ./synth/... -count=1` +- **After every plan wave:** Run `go test ./... -count=1` +- **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 | +|---------|------|------|-------------|-----------|-------------------|-------------|--------| +| 03-01-01 | 01 | 1 | CLAS-02 | unit | `go test ./classify/... -run TestHashBucketDistribution -count=1` | ❌ W0 | ⬜ pending | +| 03-01-02 | 01 | 1 | CLAS-02 | unit | `go test ./classify/... -run TestAllClassesCount -count=1` | ❌ W0 | ⬜ pending | +| 03-01-03 | 01 | 1 | CLAS-02 | unit | `go test ./classify/... -run TestClassifyUnknown -count=1` | ✅ update | ⬜ pending | +| 03-01-04 | 01 | 1 | CLAS-02 | unit | `go test ./synth/... -run TestNewBankHas11Layers -count=1` | ✅ update | ⬜ pending | +| 03-01-05 | 01 | 1 | CLAS-02 | unit | `go test ./synth/... -run TestClassFreqConfigsComplete -count=1` | ❌ W0 | ⬜ pending | +| 03-02-01 | 02 | 2 | CAPT-03 | integration | `go test ./encode/... -run TestMP3Valid -count=1` | ✅ | ⬜ pending | +| 03-02-02 | 02 | 2 | CAPT-03 | manual | `sudo ./netsynth -i lo -o /tmp/test.mp3` | N/A | ⬜ pending | + +*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky* + +--- + +## Wave 0 Requirements + +- [ ] `classify/classifier_test.go` — `TestHashBucketDistribution` covering all 4 bucket outputs +- [ ] `classify/types_test.go` (or `classifier_test.go`) — `TestAllClassesCount` asserting 14 classes, no `ClassUnknown` +- [ ] `synth/config_test.go` — `TestClassFreqConfigsComplete` asserting every class in `AllClasses()` has a `FreqConfig` entry +- [ ] Update `synth/bank_test.go:TestNewBankHas11Layers` → assert `14` (not `11`) +- [ ] Update `classify/classifier_test.go:TestClassifyUnknown` → assert `unknown-` prefix, not removed `ClassUnknown` constant + +--- + +## Manual-Only Verifications + +| Behavior | Requirement | Why Manual | Test Instructions | +|----------|-------------|------------|-------------------| +| Encoding status messages (Encoding.../Saved...) printed to stderr | CAPT-03 | CLI output format is presentation, not logic | Build binary, run `sudo ./netsynth -i lo -o /tmp/test.mp3`, generate traffic, Ctrl+C. Verify stderr shows "Encoding..." then "Saved..." with path, duration, size, encoding time. | +| MP3 reflects actual traffic mix — different sessions sound different | CAPT-03 | Perceptual audio quality requires human listening | Run two sessions with different traffic profiles (e.g., DNS-heavy vs HTTPS-heavy). Play both MP3s. Verify they sound distinct. | + +--- + +## 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 < 5s +- [ ] `nyquist_compliant: true` set in frontmatter + +**Approval:** pending