From 0b910d216e0fad788e410a626cbd323b39057a35 Mon Sep 17 00:00:00 2001 From: Paperclip Builder Date: Mon, 26 Oct 2026 22:36:34 +1100 Subject: [PATCH] ingestion: group oversize and binary rejections in the report --- corpus/sources/estate.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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()))