Add transparent library health engine

This commit is contained in:
Philip Guzman
2026-06-30 17:47:54 -07:00
parent 167f029c28
commit b8bf9ec6e1
6 changed files with 155 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
from dataclasses import dataclass
from typing import Optional
@dataclass(frozen=True)
class HealthReport:
"""Transparent aggregate findings from a read-only library analysis."""
score: Optional[float]
total_references: int
healthy_references: int
missing_references: int
unique_missing_filenames: int
disk_tracks: int
duplicate_filename_groups: int
duplicate_files: int
unused_tracks: int
suggested_matches: int
@property
def score_basis(self) -> str:
return "Resolved crate references / total crate references"