Phase 3 KPI 상태값 명시

This commit is contained in:
Yun Chan 2026-06-28 23:53:17 +09:00
parent 1e9f293fda
commit f7aae885b2
4 changed files with 42 additions and 21 deletions

View file

@ -75,6 +75,7 @@ class Phase3ArtifactCheckerTests(unittest.TestCase):
"pass": True,
"numerator": 1,
"denominator": 1,
"status": "computed_prepost",
"method": "fixture",
"source_files": ["fixture"],
}
@ -195,6 +196,20 @@ class Phase3ArtifactCheckerTests(unittest.TestCase):
report.errors,
)
def test_kpi_metric_status_must_be_known(self) -> None:
root = self.make_root()
report_path = root / "02-measures" / "kpi_report.json"
data = json.loads(report_path.read_text(encoding="utf-8"))
data["metrics"]["sus"]["status"] = "maybe_later"
report_path.write_text(json.dumps(data), encoding="utf-8")
report = checker.validate(root, max_scan_rows=100)
self.assertTrue(
any("metric 'sus' status 'maybe_later' is invalid" in error for error in report.errors),
report.errors,
)
def test_csv_enum_values_are_validated(self) -> None:
root = self.make_root()
write_text(