From e0b189aa6d8a44911fbd3a278eba39ca4d75b016 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 14 Jul 2026 22:42:03 +0000 Subject: [PATCH] Correct two pashub-verified pre_sap values in the accuracy manifest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Manually verified in pashub (Khalim, 2026-07-14): deal 499584755922 (9 Council Houses, CW5 8AP) is F33, not the stale D67 — our computed 34.0 was right within a point; deal 499617935574 (Brightholme, 14 North Road) is the accredited E43, not the preliminary 53. 58 Hackle Street (D58) and 16 Bingley Close (E52) were confirmed correct, so our +7.8/+5.7 deviations there are extraction bugs to hunt next. Harness MAE 1.684 -> 1.551; ceiling ratcheted to 1.56. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../tests/fixtures/pashub_accuracy/manifest.json | 10 +++++----- .../documents_parser/tests/test_pashub_sap_accuracy.py | 8 +++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/backend/documents_parser/tests/fixtures/pashub_accuracy/manifest.json b/backend/documents_parser/tests/fixtures/pashub_accuracy/manifest.json index a5984529e..7db88f559 100644 --- a/backend/documents_parser/tests/fixtures/pashub_accuracy/manifest.json +++ b/backend/documents_parser/tests/fixtures/pashub_accuracy/manifest.json @@ -587,8 +587,8 @@ { "deal_id": "499584755922", "uprn": null, - "pre_sap_raw": "D67", - "pre_sap_score": 67, + "pre_sap_raw": "F33", + "pre_sap_score": 33, "pdf": "499584755922.pdf" }, { @@ -811,8 +811,8 @@ { "deal_id": "499617935574", "uprn": null, - "pre_sap_raw": "E53", - "pre_sap_score": 53, + "pre_sap_raw": "E43", + "pre_sap_score": 43, "pdf": "499617935574.pdf" }, { @@ -1439,4 +1439,4 @@ "pdf": "507693673709.pdf" } ] -} +} \ No newline at end of file diff --git a/backend/documents_parser/tests/test_pashub_sap_accuracy.py b/backend/documents_parser/tests/test_pashub_sap_accuracy.py index 4cbcbfe26..e84f3d037 100644 --- a/backend/documents_parser/tests/test_pashub_sap_accuracy.py +++ b/backend/documents_parser/tests/test_pashub_sap_accuracy.py @@ -97,7 +97,13 @@ _MIN_WITHIN_HALF: float = 0.18 # the surveyed roof insulation + stud-wall commons, and community heating # lodging Table 4a code 301 + Table 12 fuel 51 (507644414148 computes on the # heat-network branch). Observed MAE 1.684. -_MAX_SAP_MAE: float = 1.70 +# Ratcheted 1.70 -> 1.56 after Khalim manually verified 4 suspect pre_sap +# values in pashub (2026-07-14): 9 Council Houses CW5 8AP is F33 (manifest had +# a stale D67 — our 34.0 was right within a point) and Brightholme M11 4WE is +# the accredited 43 (was pashub's preliminary 53). 58 Hackle Street D58 and +# 16 Bingley Close E52 were CONFIRMED correct — our +7.8/+5.7 deviations there +# are extraction bugs to hunt. Observed MAE 1.551. +_MAX_SAP_MAE: float = 1.56 _KNOWN_GAP_REASON = ( "pashub `from_site_notes` mapper does not int-code a main-heating "