- 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)
- 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
- 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
- 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
- Replace ClassUnknown with ClassUnknown1-4 (unknown-1 through unknown-4)
- AllClasses() now returns 14 elements
- Add hashBucket() function routing unrecognized traffic deterministically
- Update synth/config.go: NumLayers=14, 4 dissonant unknown tone configs at 862-1047 Hz
- Add TestAllClassesCount and TestHashBucketDistribution tests
- Add TestClassFreqConfigsComplete and TestNumLayersMatchesAllClasses to config_test.go
- Update TestNewBankHas14Layers, TestMixerNoClip for 14 classes
- All classify and synth tests pass
- Add outputPath var and -o/--output Cobra flag (OUT-01)
- Default output path resolves to netsynth-<timestamp>.mp3 when -o not provided (D-15)
- Snapshot accumulator collects all WindowSnapshots for Phase 3 synthesis wiring
- TODO(phase-3) marker for encode.RunSynthesis integration
- EncodeMP3: writes stereo PCM frames to MP3 via go-lame (44100 Hz, 128 kbps, stereo)
- RunSynthesis: renders WindowSnapshots through OscillatorBank then encodes to MP3
- Zero-packet guard before file creation returns descriptive error (OUT-03)
- InitParams called after all Set* calls per go-lame requirements
- TestMP3Valid: synthetic snapshots through full pipeline, ffprobe validation
- TestZeroPacketError: empty slice and zero-count snapshots return error, no file created
- TestEncodeMP3DirectBytes: direct frame encoding validated by ffprobe
- Created 02-02-SUMMARY.md with plan results and 14 test descriptions
- Updated STATE.md: advanced to plan 3 of 3, recorded metrics and decisions
- Updated ROADMAP.md: phase 02 showing 2/3 summaries complete
- Marked SYNTH-03 complete in REQUIREMENTS.md
- NewBank creates 11 layers from ClassFreqConfigs, one per TrafficClass
- RenderWindow transforms WindowSnapshot into SamplesPerWindow stereo frames
- GainPerLayer (1/11) applied per layer guarantees no clipping with all layers at max
- PanGains applied per layer for constant-power stereo positioning
- EMA amplitude smoothing provides temporal convergence across windows
- 7 bank tests: layer count, output length, silence, non-zero, no-clip, stereo pan, EMA convergence
- synth/config.go: FreqConfig, HarmonicDef types; ClassFreqConfigs for all 11 traffic classes
with frequencies in 60-800 Hz using musical intervals; pan positions per D-12
- synth/oscillator.go: phase-accumulator oscillator with additive harmonic synthesis
and phase subtraction wrap (not math.Mod) per D-05
- synth/layer.go: EMA amplitude smoothing with tau-based alpha; whisper floor (0.03)
prevents silence once class has been seen; UpdateTarget/AdvanceSample interface
- All 12 tests pass (TestAllClassesHaveConfig, TestFrequenciesUnique, TestEMAAmplitudeRise, etc.)
- Add github.com/sjzar/go-lame v0.0.9 to go.mod for MP3 encoding
- gcc and ffprobe available via apt (gcc 13.3.0, ffprobe 6.1.1)
- CGO_ENABLED=1 build verified successful
- cmd/netsynth/main.go: Cobra root command with -i, --list-interfaces, --verbose flags
- Signal handling via signal.NotifyContext for clean Ctrl+C shutdown
- 3-stage pipeline: capture.StartCapture -> classify.NewClassifier -> aggregate.Aggregate
- Permission errors surface platform-specific sudo/setcap hint (CAPT-04)
- --verbose flag wires aggregate.PrintWindowLine callback for per-window output
- Exit summary via aggregate.PrintSummary with dropped packet warning
- cmd/netsynth/main_test.go: 3 tests covering flag parsing and help output
- go.mod: cobra v1.10.2 and go-pcap promoted to direct dependencies
- ListInterfaces uses net.Interfaces() stdlib (no pcap dependency for listing)
- OpenCapture wraps packetcap/go-pcap with platform-specific permission error handling
- StartCapture uses buffered channel (512) with atomic drop counter
- Dynamic link type detection via layers.LinkType(handle.LinkType())
- Linux error shows setcap cap_net_raw+ep hint; macOS shows sudo hint
- Add github.com/packetcap/go-pcap v0.0.0-20251215 to go.mod