fix: treat paired missing packet metrics honestly
Validators (Pushes and Pull Requests) / validate-ui-and-storage (push) Successful in 14s
Validators (Pushes and Pull Requests) / validate-core (push) Failing after 1m35s

This commit is contained in:
2026-07-12 12:49:34 +09:00
parent fbb56400af
commit 7db7f74713
+8 -4
View File
@@ -44,6 +44,8 @@ def _as_number(value: str | None) -> float | None:
def _compare_numeric(errors: list[str], label: str, packet_value: float | int | None, report_value: str | None, tolerance: float = 0.01) -> None:
report_number = _as_number(report_value)
if packet_value is None and (report_value is None or report_value.strip().lower() in {"n/a", "null", "data_missing"}):
return
if packet_value is None or report_number is None:
errors.append(f"{label} missing comparison value")
return
@@ -74,12 +76,14 @@ def main() -> int:
pred_section = _find_section(report, "prediction_evaluation_improvement_report")
_compare_numeric(errors, "PASS_100 score_0_100", pass_100.get("score_0_100"), _extract_table_value(pass_100_section, "score_0_100"))
if str(pass_100.get("gate") or "") != str(_extract_table_value(pass_100_section, "게이트")):
errors.append(f"PASS_100 gate mismatch: packet={pass_100.get('gate')} report={_extract_table_value(pass_100_section, '게이트')}")
pass_gate_report = _extract_table_value(pass_100_section, "게이트")
if not (pass_100.get("gate") is None and str(pass_gate_report or "").lower() in {"n/a", "null", "data_missing"}) and str(pass_100.get("gate") or "") != str(pass_gate_report):
errors.append(f"PASS_100 gate mismatch: packet={pass_100.get('gate')} report={pass_gate_report}")
_compare_numeric(errors, "execution_readiness min_axis_score", exec_readiness.get("min_axis_score"), _extract_table_value(exec_section, "min_axis_score"))
if str(exec_readiness.get("gate") or "") != str(_extract_table_value(exec_section, "게이트")):
errors.append(f"execution_readiness gate mismatch: packet={exec_readiness.get('gate')} report={_extract_table_value(exec_section, '게이트')}")
exec_gate_report = _extract_table_value(exec_section, "게이트")
if not (exec_readiness.get("gate") is None and str(exec_gate_report or "").lower() in {"n/a", "null", "data_missing"}) and str(exec_readiness.get("gate") or "") != str(exec_gate_report):
errors.append(f"execution_readiness gate mismatch: packet={exec_readiness.get('gate')} report={exec_gate_report}")
_compare_numeric(errors, "prediction match_rate_pct", prediction.get("match_rate_pct"), _extract_table_value(pred_section, "일치율"))