rollup — design
Class:
design· Function axis:f0the folds ·f1per-repo health ·f2fleet rollup. Strict: only the shape we run. The system view is indesign.md.
f0 — the folds
rollup (module rollup.rs, always compiled — no feature) is pure higher-level folds over scan + advisory data, so a consumer can see modgunn at altitude. No warehouse, no network; the warehouse layer maps its FleetFindings in.
SeverityHistogram::of(severities)(rollup.rs:34) — counts info/low/medium/high/critical + total;worst()(rollup.rs:51) is the top severity,health_score()(rollup.rs:70) a 0–1 health number.tally(items)(rollup.rs:83) — a generic frequency fold→ Vec<(K, count)>.
Reuse: rollup.uses = [core, warehouse] — but only to map in FleetFindings; the folds themselves are pure and take plain input, so rollup works with or without the warehouse.
f1 — per-repo health
FindingRow (rollup.rs:102) is the pure input { repo, component, severity }; repo_health(findings) (rollup.rs:128) folds rows into RepoHealth (rollup.rs:112) { repo, vulnerable_components, findings, critical, high, worst, score } per repo.
f2 — fleet rollup
fleet_rollup(findings) (rollup.rs:170) produces FleetRollup (rollup.rs:159) { severity, repos, top_components, affected_repos } — the whole-fleet posture. The bridge from the warehouse layer is FindingRow::from_fleet (rollup.rs:184) and rollup_fleet_findings(&[FleetFinding]) (rollup.rs:191), which maps warehouse::FleetFindings straight into a FleetRollup.