From 5da621c7a5d6a78227020c20915ebc0febfaab95 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 14 Jul 2026 16:43:54 +0000 Subject: [PATCH] =?UTF-8?q?Ratchet=20PasHub=20SAP-accuracy=20floor=20to=20?= =?UTF-8?q?10.9%=20within-0.5=20(control-code=20fix=20unblocks=20201/205)?= =?UTF-8?q?=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- .../tests/test_pashub_sap_accuracy.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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 "