feat(audit): MVP output - AUDIT_REPORT.md only, move stale to _stale/
MVP pipeline simplification: - render_rollups() now produces ONLY summary.md + AUDIT_REPORT.md - run_audit() now produces only per-aggregate .md (no .dsl/.tree) - New src/code_path_audit_gen.py generates the single coherent report Stale artifacts moved to _stale/ subdirectory (preserved for history): - 13 per-aggregate .dsl files (redundant with .md) - 13 per-aggregate .tree files (redundant with .md) - 9 old top-level rollups (cross_audit_summary, decomposition_matrix, candidates, field_usage, call_graph, hot_paths, dead_fields, ssdl_analysis, organization_deductions - all superseded by sections inlined in AUDIT_REPORT.md) - _stale/README.md explains what happened Meta-audit updated to check .md files (14 required H2 sections per aggregate) instead of .dsl files. 0 violations on 10 real profiles. Tests: 131 passing. New MVP report: 5000+ lines.
This commit is contained in:
@@ -14,20 +14,20 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
REQUIRED_SECTIONS: tuple[str, ...] = (
|
||||
"aggregate_kind",
|
||||
"memory_dim",
|
||||
"producers",
|
||||
"consumers",
|
||||
"access_pattern",
|
||||
"access_pattern_evidence",
|
||||
"frequency",
|
||||
"frequency_evidence",
|
||||
"result_coverage",
|
||||
"type_alias_coverage",
|
||||
"cross_audit_findings",
|
||||
"decomposition_cost",
|
||||
"optimization_candidates",
|
||||
"is_candidate",
|
||||
"Pipeline summary",
|
||||
"Producers",
|
||||
"Consumers",
|
||||
"Field access matrix",
|
||||
"Access pattern",
|
||||
"Frequency",
|
||||
"Result coverage",
|
||||
"Type alias coverage",
|
||||
"Cross-audit findings",
|
||||
"Decomposition cost",
|
||||
"Struct shape",
|
||||
"Optimization candidates",
|
||||
"Verdict",
|
||||
"Evidence appendix",
|
||||
)
|
||||
|
||||
|
||||
@@ -46,17 +46,15 @@ def main() -> int:
|
||||
return 1
|
||||
violations: list[str] = []
|
||||
files_checked = 0
|
||||
for dsl_path in sorted(aggregates_dir.glob("*.dsl")):
|
||||
content = dsl_path.read_text(encoding="utf-8")
|
||||
if " true is-candidate" in content:
|
||||
for md_path in sorted(aggregates_dir.glob("*.md")):
|
||||
content = md_path.read_text(encoding="utf-8")
|
||||
if "**Is candidate:** True" in content:
|
||||
continue
|
||||
files_checked += 1
|
||||
for section in REQUIRED_SECTIONS:
|
||||
marker_prefix = f"\\ === {section}"
|
||||
if marker_prefix not in content:
|
||||
violations.append(f"{dsl_path.name}: missing section '{section}'")
|
||||
if " cross-audit-findings" not in content:
|
||||
violations.append(f"{dsl_path.name}: missing 'N cross-audit-findings' count line")
|
||||
marker = f"## {section}"
|
||||
if marker not in content:
|
||||
violations.append(f"{md_path.name}: missing section '{section}'")
|
||||
if violations:
|
||||
print(f"Meta-audit: {len(violations)} violations ({files_checked} real profiles checked)")
|
||||
for v in violations:
|
||||
|
||||
Reference in New Issue
Block a user