Repository navigation
2.4.0
What's Changed
A run without a baseline can now say whether it passed.
Added
-
RunResult.checks, amodels.ThresholdCheckthe runner fills in: the suite's absolute guardrails (min/max) measured against this run. Most of a suite's rules are absolute and answerable from one run; only the win metric and the relative rules need a baseline.There is nothing new to call.
compareis for comparing, and a single run was never a comparison — so the runner does it, the same way it already recordsgraders.verdict: pass [ok] errors - 0.0000 ok [ok] length_ok - 1.0000 ok [skipped] cta_mentions_offer - must_not_decrease not evaluated: needs a baseline -
compare.check_thresholds(scorecard, thresholds), which the runner uses.
Changed
-
Breaking:
GuardrailResult.passedis nowbool | None.Nonemeans the rule could not be evaluated — amust_not_increase/must_not_decreasewith no baseline. Testpassed is Falsefor a breach;not passednow also catches the skipped case. The Markdown and HTML reporters render it asskippedrather than a breach. -
store.score_rowsreportsrun.checkson the gate columns when noComparisonis passed:gate_verdictand the per-metricguardrailbecome real, whilegate_winstays'none'.That split is the point.
gate_winis what marks the threewin_*fields as never computed rather than measured at zero, so an ungated run reports a real verdict without claiming a comparison happened. A rule that could not run reportsguardrail = 'none'with the reason inguardrail_gap, never a falsepass. -
A
Comparisonsupersedes the run's own checks: same rules, plus a baseline, so it gets the relative ones too.
Upgrading: if you read GuardrailResult.passed, change not g.passed to g.passed is False.