Skip to content

enhancement: surface ReassemblyStats in reporter output #38

@Zious11

Description

@Zious11

Summary

Found by silent-failure-hunter during PR #37 review. The reassembly engine tracks detailed stats (segments_inserted, segments_duplicates, segments_overlaps, segments_out_of_window, segments_segment_limit, bytes_reassembled, evictions, etc.) but none of these are surfaced in the terminal or JSON reporter output.

Problem

ReassemblyStats is accessible via reassembler.stats() and used in tests, but the reporting pipeline only receives Summary, Vec<Finding>, and Vec<AnalysisSummary>. No code path passes reassembly stats to the reporters.

This means counters like segments_segment_limit (added in PR #37) and segments_out_of_window are invisible to users running wirerust analyze.

Recommended Fix

Two options (not mutually exclusive):

  1. Add a reassembly stats section to reporter output — pass ReassemblyStats to TerminalReporter and JsonReporter, render as a summary section
  2. Generate Findings for notable events — when segments_segment_limit > 0, segments_out_of_window > 0, or evictions > 0, generate a Finding during finalize() so users see these in the findings list (which IS surfaced)

Option 2 is lower effort and fits the existing pattern (overlap/small-segment anomalies already generate Findings).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions