diff --git a/corpus/sources/estate.py b/corpus/sources/estate.py index 61e62c0..fdda17c 100644 --- a/corpus/sources/estate.py +++ b/corpus/sources/estate.py @@ -54,7 +54,14 @@ class Harvest: def rejection_summary(self) -> dict: counts = {} for row in self.rejections: - key = f"{row.get('platform')}/{row.get('reason')}" + reason = str(row.get("reason") or "unknown") + # Keep the summary readable: 200 distinct oversize byte counts are + # one finding, not two hundred. + if reason.startswith("oversize"): + reason = "oversize" + elif reason.startswith("binary"): + reason = "binary" + key = f"{row.get('platform')}/{reason}" counts[key] = counts.get(key, 0) + 1 return dict(sorted(counts.items()))