Ratchet PasHub SAP-accuracy floor to 10.9% within-0.5 (control-code fix unblocks 201/205) 🟩

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-14 16:43:54 +00:00
parent ca38c8a403
commit 5da621c7a5

View file

@ -62,12 +62,14 @@ _FIXTURES_DIR = Path(__file__).parent / "fixtures" / "pashub_accuracy"
_MANIFEST_PATH = _FIXTURES_DIR / "manifest.json"
# --- Ratchets (never loosen), mirroring test_sap_accuracy_corpus.py. ----------
# TODO(pashub-fuel-code): every fixture is currently blocked on the pashub
# main-fuel-code mapper gap, so the aggregate xfails and these bootstrap values
# are never asserted. Once that mapper fix lands and the aggregate first
# computes, ratchet these to the observed within-0.5 and MAE.
_MIN_WITHIN_HALF: float = 0.0
_MAX_SAP_MAE: float = 100.0
# First real aggregate: the main-heating control-code mapper fix (#1557) is the
# gap that unblocks computation for the cohort. Before it, every fixture raised
# `UnmappedSapCode: main_heating_control` (0/205 computed, aggregate xfailed);
# with it, 201/205 compute (4 still blocked on the residual fuel-code gap,
# e.g. Bulk LPG). Observed at that point: SAP within-0.5 = 10.9% (22/201),
# MAE = 2.792. Ratchet up as later field fixes land, per #1568.
_MIN_WITHIN_HALF: float = 0.109
_MAX_SAP_MAE: float = 2.793
_KNOWN_GAP_REASON = (
"pashub `from_site_notes` mapper does not int-code a main-heating string "