Skip to main content

Module finding_hotspot_overlap

Module finding_hotspot_overlap 

Expand description

finding-hotspot-overlap — external scanner findings fused with behavioral hotspot and code-health signal.

For each file path that appears in the external findings sidecar, this analysis emits one row carrying:

  • findings — total finding count across all engines
  • engines — comma-joined, sorted list of engine names
  • worst_level — most severe level ("error" > "warning" > "note")
  • hotspot_score — from [hotspots::run_hotspots]; 0.0 when absent
  • revs_percentilePERCENT_RANK of this file’s revision count within the hotspot result set; 0.0 when absent from hotspots
  • health_band"red" / "yellow" / "green" from [code_health::run_code_health]; "unknown" when absent
  • priority — classifier produced by priority_label

§Join strategy

The external sidecar and the main FactsDb each own a separate !Send + !Sync DuckDB connection; they MUST NOT be ATTACHed together. All joining is done in Rust via HashMap lookups after materialising each side independently.

§Absent paths

A path that has findings but is not in the hotspot result set (new file, below min_revs, unsupported language) still appears in the output with hotspot_score = 0.0, revs_percentile = 0.0. This is the honest LEFT-join contract documented to callers.

Structs§

FindingHotspotOverlapRow
One row of finding-hotspot-overlap output.

Functions§

priority_label
Classify priority given the three fused signals.
run_finding_hotspot_overlap
Run the finding-hotspot-overlap analysis.
run_finding_hotspot_overlap_with
Run the finding-hotspot-overlap analysis with pre-computed behavioral rows.