87 lines
3.7 KiB
Markdown
87 lines
3.7 KiB
Markdown
---
|
|||
|
|
phase: 7
|
||
|
|
slug: custom-rules-and-print-config
|
||
|
|
status: draft
|
||
|
|
nyquist_compliant: false
|
||
|
|
wave_0_complete: false
|
||
|
|
created: 2026-03-26
|
||
|
|
---
|
||
|
|
|
||
|
|
# Phase 7 — Validation Strategy
|
||
|
|
|
||
|
|
> Per-phase validation contract for feedback sampling during execution.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Test Infrastructure
|
||
|
|
|
||
|
|
| Property | Value |
|
||
|
|
|----------|-------|
|
||
|
|
| **Framework** | Go standard `testing` package |
|
||
|
|
| **Config file** | None |
|
||
|
|
| **Quick run command** | `go test ./config/... ./cmd/netsynth/...` |
|
||
|
|
| **Full suite command** | `go test ./...` |
|
||
|
|
| **Estimated runtime** | ~5 seconds |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Sampling Rate
|
||
|
|
|
||
|
|
- **After every task commit:** Run `go test ./config/... ./cmd/netsynth/...`
|
||
|
|
- **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 |
|
||
|
|
|---------|------|------|-------------|-----------|-------------------|-------------|--------|
|
||
|
|
| 07-01-01 | 01 | 1 | RULE-01 | unit | `go test ./config/... -run TestLoadCustomRules` | ❌ W0 | ⬜ pending |
|
||
|
|
| 07-01-02 | 01 | 1 | RULE-01 | unit | `go test ./config/... -run TestLoadCustomRuleNoPort` | ❌ W0 | ⬜ pending |
|
||
|
|
| 07-01-03 | 01 | 1 | RULE-01 | unit | `go test ./config/... -run TestLoadCustomRuleMissingProtocol` | ❌ W0 | ⬜ pending |
|
||
|
|
| 07-01-04 | 01 | 1 | RULE-01 | unit | `go test ./config/... -run TestLoadCustomRuleMissingClass` | ❌ W0 | ⬜ pending |
|
||
|
|
| 07-01-05 | 01 | 1 | RULE-01 | unit | `go test ./config/... -run TestLoadCustomRuleUnknownField` | ❌ W0 | ⬜ pending |
|
||
|
|
| 07-01-06 | 01 | 1 | RULE-02 | unit | `go test ./config/... -run TestUserRulesPrepend` | ❌ W0 | ⬜ pending |
|
||
|
|
| 07-01-07 | 01 | 1 | RULE-03 | unit | `go test ./config/... -run TestAutoFreqAssignment` | ❌ W0 | ⬜ pending |
|
||
|
|
| 07-01-08 | 01 | 1 | RULE-03 | unit | `go test ./config/... -run TestAutoFreqDeterministic` | ❌ W0 | ⬜ pending |
|
||
|
|
| 07-01-09 | 01 | 1 | RULE-03 | unit | `go test ./config/... -run TestAutoFreqSkipsBuiltins` | ❌ W0 | ⬜ pending |
|
||
|
|
| 07-02-01 | 02 | 2 | CFG-06 | unit | `go test ./cmd/netsynth/... -run TestPrintConfigFlagRegistered` | ❌ W0 | ⬜ pending |
|
||
|
|
| 07-02-02 | 02 | 2 | CFG-06 | unit | `go test ./cmd/netsynth/... -run TestPrintConfigNoInterface` | ❌ W0 | ⬜ pending |
|
||
|
|
| 07-02-03 | 02 | 2 | CFG-06 | unit | `go test ./config/... -run TestPrintConfigContainsAllClasses` | ❌ W0 | ⬜ pending |
|
||
|
|
| 07-02-04 | 02 | 2 | CFG-06 | unit | `go test ./config/... -run TestPrintConfigContainsRules` | ❌ W0 | ⬜ pending |
|
||
|
|
| 07-02-05 | 02 | 2 | CFG-06 | unit | `go test ./config/... -run TestPrintConfigSourcePath` | ❌ W0 | ⬜ pending |
|
||
|
|
|
||
|
|
*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Wave 0 Requirements
|
||
|
|
|
||
|
|
- [ ] `config/config_test.go` — add test stubs for RULE-01, RULE-02, RULE-03 (extend existing file using `writeTOML` helper pattern)
|
||
|
|
- [ ] `cmd/netsynth/main_test.go` — add test stubs for CFG-06 (extend existing file using `newTestCmd()` pattern)
|
||
|
|
|
||
|
|
*Existing infrastructure covers framework install — `go test` already works.*
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Manual-Only Verifications
|
||
|
|
|
||
|
|
| Behavior | Requirement | Why Manual | Test Instructions |
|
||
|
|
|----------|-------------|------------|-------------------|
|
||
|
|
| Custom rule produces distinct tone in MP3 output | RULE-01 | Audio output requires human ear verification | Run `netsynth -i lo --config test.toml -o out.mp3`, listen for distinct tone on custom rule port |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 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
|