diff --git a/backend/documents_parser/tests/test_pashub_sap_accuracy.py b/backend/documents_parser/tests/test_pashub_sap_accuracy.py index 1f23d4a68..e79120322 100644 --- a/backend/documents_parser/tests/test_pashub_sap_accuracy.py +++ b/backend/documents_parser/tests/test_pashub_sap_accuracy.py @@ -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 "