Problem Description
The project has zero tests. Every code change is a blind deployment — no regression coverage, no safety net for concurrency fixes, no validation of edge cases. This is the highest-risk gap in the project.
Proposed Solution
Add a Go test suite covering at minimum:
- StateManager (BlockIP, UnblockIP, manageUnblocks, IsBlocked) — concurrency safety under
-race
- MLEngine (AnalyzePacket, feature extraction) — heuristic thresholds
- SteganographyDetector (AnalyzePacket, calculateEntropy) — entropy boundaries
- WhitelistManager (Add, Remove, IsWhitelisted) — concurrent read/write patterns
- ProtocolReconstructionEngine (extractFlowKey, generateSessionID, createNewSession, sessionCleanup) — no data races
The StateManager and WhitelistManager are the highest-value targets due to their concurrent access patterns and the TOCTOU bugs recently fixed.
Affected Area
Code quality / testing
Alternatives Considered
- Integration tests with a real pcap interface (requires root + hardware) — too heavy for CI
- Manual testing only — current state, unsustainable
Problem Description
The project has zero tests. Every code change is a blind deployment — no regression coverage, no safety net for concurrency fixes, no validation of edge cases. This is the highest-risk gap in the project.
Proposed Solution
Add a Go test suite covering at minimum:
-raceThe StateManager and WhitelistManager are the highest-value targets due to their concurrent access patterns and the TOCTOU bugs recently fixed.
Affected Area
Code quality / testing
Alternatives Considered