Skip to content

fix: deep code review passes 19-20 - API hardening, test coverage, an… - #271

Merged
mikemiles-dev merged 2 commits into
mainfrom
fix/deep-code-review-pass-19-20
Mar 14, 2026
Merged

fix: deep code review passes 19-20 - API hardening, test coverage, an…#271
mikemiles-dev merged 2 commits into
mainfrom
fix/deep-code-review-pass-19-20

Conversation

@mikemiles-dev

Copy link
Copy Markdown
Owner

…d correctness fixes

Pass 19:

  • clear_v9_templates/clear_ipfix_templates now also clear pending flows
  • V9/IPFIX template validation rejects field_length=0
  • Deduplicate validate_config (delegate to Config::validate)
  • Strengthen 5 malformed-input test assertions
  • Remove 7 vacuous initial-state tests
  • Add round-trip tests: DurationMicrosNTP, DurationNanosNTP, U128, I128, U24, enterprise fields, multi-template flowset
  • Add concurrent V9 template test and template collision data verification

Pass 20:

  • Add #[non_exhaustive] to 9 public types (NetflowError, ConfigError, FieldValue, Config, PendingFlowsConfig, CacheStats, ParserCacheStats, CacheMetricsSnapshot, NoTemplateInfo)
  • Remove dead MissingTemplate error variant
  • Add root re-exports: FieldValue, DataNumber, FieldDataType, V9Field, V9FieldPair, V9FlowRecord
  • InvalidErrorSampleSize/InvalidMaxSources now carry the rejected value
  • CacheMetrics mutation methods scoped to pub(crate), dead reset() removed
  • resize() now validates full PendingFlowsConfig
  • README: fix error type list (removed MissingTemplate, added FilteredVersion), fix URP->UDP typo

…d correctness fixes

Pass 19:
- clear_v9_templates/clear_ipfix_templates now also clear pending flows
- V9/IPFIX template validation rejects field_length=0
- Deduplicate validate_config (delegate to Config::validate)
- Strengthen 5 malformed-input test assertions
- Remove 7 vacuous initial-state tests
- Add round-trip tests: DurationMicrosNTP, DurationNanosNTP, U128, I128, U24, enterprise fields, multi-template flowset
- Add concurrent V9 template test and template collision data verification

Pass 20:
- Add #[non_exhaustive] to 9 public types (NetflowError, ConfigError, FieldValue, Config, PendingFlowsConfig, CacheStats, ParserCacheStats, CacheMetricsSnapshot, NoTemplateInfo)
- Remove dead MissingTemplate error variant
- Add root re-exports: FieldValue, DataNumber, FieldDataType, V9Field, V9FieldPair, V9FlowRecord
- InvalidErrorSampleSize/InvalidMaxSources now carry the rejected value
- CacheMetrics mutation methods scoped to pub(crate), dead reset() removed
- resize() now validates full PendingFlowsConfig
- README: fix error type list (removed MissingTemplate, added FilteredVersion), fix URP->UDP typo
@mikemiles-dev
mikemiles-dev merged commit 43afc21 into main Mar 14, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant