Skip to content

fix: deep code review pass 22 - README JSON, non_exhaustive, test ass… - #273

Merged
mikemiles-dev merged 4 commits into
mainfrom
fix/deep-code-review-pass-22
Mar 14, 2026
Merged

fix: deep code review pass 22 - README JSON, non_exhaustive, test ass…#273
mikemiles-dev merged 4 commits into
mainfrom
fix/deep-code-review-pass-22

Conversation

@mikemiles-dev

Copy link
Copy Markdown
Owner

…ertions

  • Update README JSON example to match actual serialization output (sys_up_time/first/last are u32 not Duration, field name is flowsets not sets)
  • Add #[non_exhaustive] to 5 public types: NetflowPacket, ParseResult, TemplateEvent, TemplateProtocol, ScopingInfo
  • Fix test_error_sample_size_bounded vacuous if-let (now panics on wrong variant)
  • Tighten scoped parser test assertions from >= 2 to == 2
  • Update match arms in examples/tests/doctests for non_exhaustive compatibility

…ertions

- Update README JSON example to match actual serialization output
  (sys_up_time/first/last are u32 not Duration, field name is flowsets not sets)
- Add #[non_exhaustive] to 5 public types: NetflowPacket, ParseResult,
  TemplateEvent, TemplateProtocol, ScopingInfo
- Fix test_error_sample_size_bounded vacuous if-let (now panics on wrong variant)
- Tighten scoped parser test assertions from >= 2 to == 2
- Update match arms in examples/tests/doctests for non_exhaustive compatibility
Add 12 undocumented breaking changes:
- CacheStats field rename (max_size -> max_size_per_cache) + num_caches
- TemplateEvent.template_id changed to Option<u16>
- CacheMetrics record methods scoped to pub(crate), reset() removed
- trigger_template_event &self -> &mut self
- parse_bytes_as_netflow_common_flowsets return type (netflow_common)
- NetflowCommonFlowSet first_seen/last_seen widened to u64
- NetflowCommonError::UnknownVersion wraps u16 not NetflowPacket
- get_source_stats &self -> &mut self
- #[non_exhaustive] on 14 public types
- FilteredVersion error variant added to NetflowError
- Enterprise field registration now IPFIX-only

Add 7 undocumented new features:
- Builder methods for max_records_per_flowset, max_template_total_size
- prune_idle_sources() on scoped parsers
- hook_error_count() on NetflowParser
- #![forbid(unsafe_code)]
- Expanded root re-exports

Add 3 undocumented behavioral changes:
- clear_templates now clears pending flows
- has_template now respects TTL
- template_ids now sorted and deduped

Update Known Limitations: varlen serialization is fixed when
template_field_lengths is populated (only Data::new() is affected)
@mikemiles-dev
mikemiles-dev merged commit 10c6e5a 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