3 Commits
Author SHA1 Message Date
gurix d43914f869 feat(07-02): wire LoadResult into main.go and add --print-config flag
- Add printConfig bool var and --print-config flag registration
- runPrintConfig() early-exit before interface-required check (CFG-06)
- runLiveMode and runPcapMode accept config.LoadResult; user rules prepend via append(result.UserRules, classify.DefaultRules...)
- Remove unused synth import from main.go
- Add TestPrintConfigFlagRegistered, TestPrintConfigNoInterface, TestPrintConfigWithConfigFile
- newTestCmd() wires --print-config and --config flags through PersistentPreRunE
2026-03-26 21:51:19 +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 1be56a5a35 feat(01-04): wire Cobra CLI with capture-classify-aggregate pipeline
- 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
2026-03-25 12:22:10 +01:00