| 885 | |
| 886 | |
| 887 | def summarize(records: list[FileRecord]) -> dict[str, int]: |
| 888 | return { |
| 889 | "files": len(records), |
| 890 | "warnings": sum(1 for r in records if r.warnings), |
| 891 | "errors": sum(1 for r in records if r.errors), |
| 892 | "missing_metadata": sum(1 for r in records if "missing_metadata" in r.warnings), |
| 893 | "missing_last_verified": sum(1 for r in records if "missing_last_verified" in r.warnings), |
| 894 | "content_stale": sum(1 for r in records if any(w.startswith("content_stale") for w in r.warnings)), |
| 895 | "verified_stale": sum(1 for r in records if any(w.startswith("verified_stale") for w in r.warnings)), |
| 896 | } |
| 897 | |
| 898 | |
| 899 | def to_markdown(report: Report, cfg: ToolConfig) -> str: |