feat: make Core reports commercially production-ready

This commit is contained in:
thanhnv
2026-07-29 13:12:11 +07:00
parent 67d482ae7f
commit 7f01cf980a
27 changed files with 1197 additions and 23 deletions
@@ -30,6 +30,16 @@ class LocalReportTests(unittest.TestCase):
"enforcement_mode": "enforce",
"maturity": {"level": 4, "status": "assessed"},
}), encoding="utf-8")
(self.root / ".casan" / "readiness.json").write_text(json.dumps({
"schema_version": 1,
"overall_status": "ready",
"dimensions": {
"core": {"status": "ready", "acceptance": []},
"domain_pipeline": {"status": "not_configured"},
"provider_telemetry": {"status": "optional_unavailable"},
},
"next_actions": [],
}), encoding="utf-8")
for path in (
".specify/state",
".specify/logs/trace",
@@ -92,6 +102,8 @@ class LocalReportTests(unittest.TestCase):
self.assertEqual(h6["summary"]["runs"], 0)
self.assertIsNone(h6["summary"]["tokens"]["total"])
self.assertTrue(any(item["code"] == "METRICS_MISSING" for item in h6["findings"]))
profile = REPORT.project_profile(self.root)
self.assertEqual(profile["readiness"]["dimensions"]["core"]["status"], "ready")
def test_run_reconstructs_all_gates_and_redacts_sensitive_fields(self):
self.write_run()
@@ -160,6 +172,10 @@ class LocalReportTests(unittest.TestCase):
self.assertIn('tabindex="-1"', script)
self.assertIn('dossier.focus({ preventScroll: true })', script)
self.assertIn("dossier.scrollIntoView({", script)
self.assertIn("No operational KPIs are shown until evidence exists.", script)
self.assertIn("H6 begins with the first governed run.", script)
self.assertIn("No operational counters yet", script)
self.assertNotIn('"Ready for the first governed run."', script)
if __name__ == "__main__":