Private
Public Access
0
0

feat(audit): rich rollups + per-line indentation fix - 2136 total lines

Added 3 new top-level rollups (hot_paths.md, dead_fields.md,
plus enriched summary.md, candidates.md, decomposition_matrix.md):
- summary.md: per-aggregate memory_dim + access pattern tables,
  full cross-validation verdict per aggregate
- decomposition_matrix.md: all 10 aggregates ranked by current cost,
  flagged-for-refactoring section, insufficient_data section
- candidates.md: ranked optimization candidates with detail per step
- hot_paths.md: top 5 hot consumers per aggregate (by field access count)
- dead_fields.md: fields accessed (per-consumer breakdown)

Total report: 2136 lines (was 1814).
This commit is contained in:
2026-06-22 10:29:01 -04:00
parent 59eeee819e
commit 558258cffd
21 changed files with 993 additions and 519 deletions
+16
View File
@@ -1235,10 +1235,24 @@ def render_rollups(summary: AuditSummary, output_dir: Path) -> dict[str, str]:
cand_lines.append(f"- **{p.name}**: candidate; would be detected after any_type_componentization_20260621 merges")
candidates_path.write_text("\n".join(cand_lines), encoding="utf-8")
from src.code_path_audit_render import render_field_usage_rollup, render_call_graph_rollup
from src.code_path_audit_rollups import (
render_decomposition_matrix_rich,
render_summary_rich,
render_candidates_rich,
render_hot_path_rollup,
render_dead_field_rollup,
)
field_usage_path = output_dir / "field_usage.md"
field_usage_path.write_text(render_field_usage_rollup(profiles), encoding="utf-8")
call_graph_path = output_dir / "call_graph.md"
call_graph_path.write_text(render_call_graph_rollup(profiles), encoding="utf-8")
hot_path_path = output_dir / "hot_paths.md"
hot_path_path.write_text(render_hot_path_rollup(profiles), encoding="utf-8")
dead_field_path = output_dir / "dead_fields.md"
dead_field_path.write_text(render_dead_field_rollup(profiles), encoding="utf-8")
summary_path.write_text(render_summary_rich(profiles), encoding="utf-8")
decomposition_matrix_path.write_text(render_decomposition_matrix_rich(profiles), encoding="utf-8")
candidates_path.write_text(render_candidates_rich(profiles), encoding="utf-8")
return {
"summary.md": str(summary_path),
"cross_audit_summary.md": str(cross_audit_path),
@@ -1246,6 +1260,8 @@ def render_rollups(summary: AuditSummary, output_dir: Path) -> dict[str, str]:
"candidates.md": str(candidates_path),
"field_usage.md": str(field_usage_path),
"call_graph.md": str(call_graph_path),
"hot_paths.md": str(hot_path_path),
"dead_fields.md": str(dead_field_path),
}
def code_path_audit_v2(