gurix
3dfcbbeaf5
feat(06-02): add freqCfgs parameter to RunSynthesis
...
- Change RunSynthesis signature to accept injected config map (D-10)
- Replace hardcoded synth.ClassFreqConfigs with passed-in freqCfgs
- Update all three RunSynthesis calls in encode tests to pass synth.ClassFreqConfigs
2026-03-26 21:02:35 +01:00
gurix
936aeeafd8
merge: resolve STATE.md conflict from wave 1 (keep executor version)
2026-03-26 21:00:15 +01:00
gurix
1986e8fc2e
docs(06-01): complete config package plan summary and state updates
...
- 06-01-SUMMARY.md: TOML config loader with partial merge and unknown-key detection
- STATE.md: advanced to Plan 1 complete, added Phase 06-01 decisions and metrics
- ROADMAP.md: updated Phase 6 plan progress (1/2 plans complete)
- REQUIREMENTS.md: marked CFG-01, CFG-02, CFG-04, CFG-05 complete
2026-03-26 20:59:46 +01:00
gurix
1f877e7574
feat(06-01): implement config package with TOML load, merge, validate
...
- Load() discovers, parses, validates, and merges TOML config over defaults
- SoundOverride struct with *float64/*string pointer fields for partial-merge (CFG-04)
- parseFile uses BurntSushi/toml DecodeFile + Undecoded() for unknown-key errors (CFG-05)
- discoverPath probes ./netsynth.toml then ~/.config/netsynth/config.toml (CFG-02)
- merge applies non-nil overrides per class; warns on unknown class names (D-09)
- parseWaveform maps sine/square/sawtooth/triangle strings to WaveformType
- Harmonics regenerated via WaveformPresetHarmonics when waveform/frequency changes
- All 9 tests pass; go vet clean
2026-03-26 20:57:00 +01:00
gurix
b9ec05aebc
test(06-01): add failing tests for config package TOML load, merge, validate
...
- 9 table-driven tests covering CFG-01 through CFG-05
- TestLoadPartialOverrideFrequency, TestLoadPartialOverrideWaveform, TestLoadBothOverrides
- TestLoadUnknownKey, TestLoadNoConfig, TestLoadExplicitMissing
- TestLoadUnknownClass, TestLoadInvalidWaveform, TestLoadAllDefaultsPresent
- Stub config.Load returns nil,nil — all tests fail (RED)
2026-03-26 20:56:03 +01:00
gurix
0d9508e920
docs(06): create phase plan
2026-03-26 20:51:07 +01:00
gurix
ece532b053
docs(phase-6): add validation strategy
2026-03-26 20:46:43 +01:00
gurix
21ebc5cdda
docs(06): research phase domain
2026-03-26 20:45:56 +01:00
gurix
34f922cf95
docs(state): record phase 6 context session
2026-03-26 20:39:17 +01:00
gurix
c1ab8e1777
docs(06): capture phase context
2026-03-26 20:39:08 +01:00
gurix
4ec9c64ee1
docs(phase-05): evolve PROJECT.md after phase completion
2026-03-26 17:42:52 +01:00
gurix
d915c3cd11
docs(phase-05): complete phase execution
2026-03-26 17:42:35 +01:00
gurix
d436ef154d
Merge branch 'worktree-agent-a9867cbf'
2026-03-26 17:40:03 +01:00
gurix
8e357cf432
docs(05-02): complete bank-decoupling plan — SUMMARY, STATE, ROADMAP updated
2026-03-26 17:39:48 +01:00
gurix
b2b5ab679b
test(05-02): update tests for new NewBank signature and dynamic gain
...
- All NewBank calls updated to two-argument form passing ClassFreqConfigs
- TestMixerNoClip iterates ClassFreqConfigs keys instead of classify.AllClasses()
- TestNewBankDynamicGain verifies gainPerLayer=1/N for 3-class custom config
- TestNewBankCustomConfigNoClip verifies no-clip guarantee with 2-class config
- TestNumLayersMatchesAllClasses now asserts len(ClassFreqConfigs) == len(AllClasses())
2026-03-26 17:38:37 +01:00
gurix
43307c31d5
feat(05-02): decouple NewBank from global config and fix dynamic GainPerLayer
...
- NewBank now accepts (tau float64, cfgs map[classify.TrafficClass]FreqConfig)
- gainPerLayer field added to OscillatorBank, computed as 1.0/float64(len(cfgs))
- RenderWindow UpdateTarget loop iterates b.layers (not classify.AllClasses())
- RenderWindow render loop uses b.gainPerLayer (not GainPerLayer constant)
- encode/mp3.go updated to pass synth.ClassFreqConfigs as default config map
2026-03-26 17:37:44 +01:00
gurix
a94ffdd8ef
Merge branch 'worktree-agent-a46f9aac'
2026-03-26 17:36:22 +01:00
gurix
5e31da5442
docs(05-01): complete waveform types plan summary and state updates
2026-03-26 17:35:54 +01:00
gurix
7f6471426f
feat(05-01): wire waveform resolution into NewLayer at construction time
...
- NewLayer resolves WaveformPresetHarmonics when cfg.WaveformType != WaveformCustom
- Preset harmonics stored in Layer.Config so AdvanceSample uses them unchanged
- WaveformCustom path preserves existing hand-tuned harmonics (backward compatible)
- TestNewLayerResolvesWaveformPreset: verifies preset fills harmonics on construction
- TestNewLayerPreservesCustomHarmonics: verifies hand-tuned harmonics are untouched
- TestSineRegressionVsCustomHarmonics: verifies WaveformSine == {Ratio:1,Amp:1.0}
- All 41 synth tests pass, encode tests unaffected
2026-03-26 17:34:45 +01:00
gurix
82d1e37d0f
feat(05-01): add WaveformType enum and WaveformPresetHarmonics function
...
- WaveformType int with five constants: WaveformCustom (0), WaveformSine,
WaveformSquare, WaveformSawtooth, WaveformTriangle
- WaveformPresetHarmonics generates bandlimited harmonic series for each type
- WaveformCustom returns nil to preserve existing hand-tuned harmonics
- All generated harmonics are below Nyquist (sampleRate/2)
- FreqConfig gains WaveformType field (zero value = WaveformCustom)
- ClassFreqConfigs converted to named fields (required for new struct field)
- All existing synth tests continue to pass (38 tests total)
2026-03-26 17:34:02 +01:00
gurix
88dee31264
test(05-01): add failing tests for WaveformType and WaveformPresetHarmonics
...
- TestWaveformPresetHarmonics_Sine: expects exactly {Ratio:1, Amplitude:1.0}
- TestWaveformPresetHarmonics_Square: expects odd harmonics with 1/k amplitude below Nyquist
- TestWaveformPresetHarmonics_Sawtooth: expects all harmonics with 1/k amplitude below Nyquist
- TestWaveformPresetHarmonics_Triangle: expects odd harmonics with alternating 1/k^2 amplitude
- TestWaveformPresetHarmonics_Custom: expects nil return
- TestBandlimitedHarmonicsNoAliasing: checks all ClassFreqConfigs entries at all waveform types
- TestWaveformPresetHarmonics_SquareOddOnly: odd ratios only
- TestWaveformPresetHarmonics_TriangleOddOnly: odd ratios only
- TestWaveformPresetHarmonics_SawtoothConsecutive: consecutive ratios starting at 1
2026-03-26 17:33:03 +01:00
gurix
716ffa82ee
docs(05): create phase plan
2026-03-26 17:26:46 +01:00
gurix
9fe5d37f1e
docs(phase-5): add validation strategy
2026-03-26 17:22:13 +01:00
gurix
f0821f062d
docs(05): research phase domain
2026-03-26 17:21:21 +01:00
gurix
de43a132fb
docs(state): record phase 5 context session
2026-03-26 17:11:17 +01:00
gurix
7ced25ae70
docs(05): capture phase context
2026-03-26 17:11:11 +01:00
gurix
8cb5120666
docs: create milestone v1.1 roadmap (3 phases)
2026-03-26 17:04:26 +01:00
gurix
c5478d962d
docs: define milestone v1.1 requirements
2026-03-26 17:00:58 +01:00
gurix
d413d1243f
docs: complete project research
2026-03-26 16:54:31 +01:00
gurix
8651c47b0f
docs: start milestone v1.1 Custom Sound Mappings
2026-03-26 16:44:15 +01:00
gurix and Claude Opus 4.6
41e22788fc
docs: add README with usage, architecture, and build instructions
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-26 15:29:14 +01:00
gurix and Claude Opus 4.6
1230fd1b9d
chore: archive v1.0 MVP milestone
...
Archive roadmap and requirements to milestones/, reorganize ROADMAP.md,
evolve PROJECT.md with shipped state, create retrospective.
4 phases, 11 plans, 16/16 requirements — all complete.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
v1.0
2026-03-26 15:23:04 +01:00
gurix
c8659d0579
docs(phase-04): evolve PROJECT.md after phase completion
2026-03-26 14:45:59 +01:00
gurix
a1c2c5431d
docs(phase-04): complete phase execution
2026-03-26 14:45:36 +01:00
gurix
c139d68352
docs(04-02): complete CLI flag wiring plan summary and state updates
...
- 04-02-SUMMARY.md: --filter and --read flags wired, pcap mode, deriveOutputPath
- STATE.md: advanced to plan 2/2, updated decisions, session record
- ROADMAP.md: phase 4 marked Complete (2/2 plans)
2026-03-26 14:42:33 +01:00
gurix
4adb3c4cb2
feat(04-02): wire --filter and --read flags into CLI with branching run logic
...
- Add bpfFilter and readPath global vars with flag registration
- Add deriveOutputPath helper: capture.pcap -> capture.mp3 (D-05)
- run() validates mutual exclusion of --read and -i (D-03)
- run() pre-validates BPF filter via capture.ValidateBPFFilter before capture (CAPT-05)
- runLiveMode: extracts existing live pipeline, passes bpfFilter to StartCapture
- runPcapMode: reads pcap with ReadPcapFile, classifies with timestamps, AggregatePcap, encodes
- Bookend messages: 'Reading <file>...' at start, 'Saved...' at end (D-06)
- --verbose supported in pcap mode via onSnapshot callback (D-07)
- Empty pcap produces clear error with file path (Pitfall 4)
2026-03-26 14:41:02 +01:00
gurix
09e78bf151
test(04-02): add failing tests for --filter, --read flags, mutual exclusion, deriveOutputPath
...
- TestFlagMutualExclusion: --read and -i together returns mutually exclusive error
- TestMissingSource: no source returns interface required error mentioning --read
- TestDeriveOutputPath: pcap->mp3 filename derivation
- TestFilterFlagRegistered: --filter flag present
- TestReadFlagRegistered: --read flag present
- TestInvalidBPFFilter: invalid BPF filter errors before capture
- TestHelpOutputNewFlags: --help shows --filter and --read
2026-03-26 14:39:05 +01:00
gurix
0f15d9fca4
docs(04-01): complete BPF/pcap-reader plan summary and state updates
...
- Create 04-01-SUMMARY.md for BPF validation, pcap reading, timestamp aggregation
- Update STATE.md: advance plan, record metrics, add decisions, update session
- Update ROADMAP.md: phase 4 progress to 1/2 plans complete
- Mark CAPT-05, CAPT-06 requirements complete in REQUIREMENTS.md
2026-03-26 14:36:07 +01:00
gurix
d13844f219
feat(04-01): add AggregatePcap with timestamp-based windowing and gap-filling
...
- Add AggregatePcap to aggregate/window.go: reads ClassifiedPackets from channel,
assigns to time windows using Timestamp field (D-01), fills gaps with empty
snapshots (D-02: silence), fires onSnapshot callback per window (D-07)
- Add 7 tests covering basic, multiple windows, gaps, empty input, WindowIndex,
class counts, and onSnapshot callback
- All tests pass
2026-03-26 14:34:43 +01:00
gurix
52c601019b
feat(04-01): add BPF validation, pcap reading, Timestamp field, and filter support
...
- Add Timestamp time.Time field to ClassifiedPacket (classify/types.go)
- Create capture/bpf.go: ValidateBPFFilter and CompileSoftwareBPF
- Create capture/pcap_reader.go: ReadPcapFile with optional software BPF filter
- Update OpenCapture and StartCapture to accept filter string param
- Update cmd/netsynth/main.go to pass empty filter to StartCapture
- All new tests pass; existing tests unaffected
2026-03-26 14:33:29 +01:00
gurix
38c74415ed
docs(04): create phase plan
2026-03-26 14:25:52 +01:00
gurix
5be2b48d1a
docs(phase-4): add validation strategy
2026-03-26 14:19:56 +01:00
gurix
22b5ffe0f2
docs(04): research phase BPF filter and pcap file reading
2026-03-26 14:19:09 +01:00
gurix
080da82fa0
docs(state): record phase 4 context session
2026-03-26 14:09:16 +01:00
gurix
72702254b9
docs(04): capture phase context
2026-03-26 14:09:07 +01:00
gurix
0950216729
docs(phase-03): evolve PROJECT.md after phase completion
2026-03-26 13:47:58 +01:00
gurix
3a03606249
docs(phase-03): complete phase execution
2026-03-26 13:47:29 +01:00
gurix
5e60117f2b
docs(03-02): complete pipeline-integration MVP plan
...
- Add 03-02-SUMMARY.md with end-to-end pipeline wiring results
- Update STATE.md: session, decisions, metrics, progress
- Update ROADMAP.md: phase 3 plan progress
- Mark CAPT-03 requirement complete in REQUIREMENTS.md
2026-03-26 13:16:55 +01:00
gurix
0ab2c6e316
feat(03-02): wire RunSynthesis and add encoding feedback messages
...
- Add encode import to cmd/netsynth/main.go
- Remove TODO(phase-3) stub and _ = collectedSnapshots
- Print protocol summary BEFORE encoding (D-08)
- Add 'Encoding N windows to path...' status message (D-07)
- Add 'Saved path (Xs, N KB, encoded in Xs)' confirmation (D-09)
- Update Long description: remove '(in future phases)' qualifier
- Audio duration uses float64 to avoid integer truncation (Pitfall 4)
2026-03-26 13:15:35 +01:00
gurix
7f560e89d2
docs(03-01): complete 14-class type system plan
...
- Add 03-01-SUMMARY.md with deviations and test results
- Update STATE.md: advance progress, record metrics and decisions
- Update ROADMAP.md: phase 3 plan progress
- Mark CLAS-02 requirement complete
2026-03-26 13:12:50 +01:00