From b7848848a563ff75a5d3931c70d1ae0044e2f700 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 1 Jul 2026 14:30:40 +0000 Subject: [PATCH] =?UTF-8?q?Deterministically=20guard=20the=20high-heat-ret?= =?UTF-8?q?ention=20storage=20description=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) --- .../epc/property_overrides/main_heating_guard.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/domain/epc/property_overrides/main_heating_guard.py b/domain/epc/property_overrides/main_heating_guard.py index fe8e54126..9eb50548b 100644 --- a/domain/epc/property_overrides/main_heating_guard.py +++ b/domain/epc/property_overrides/main_heating_guard.py @@ -8,4 +8,17 @@ from domain.epc.property_overrides.main_heating_system_type import ( def main_heating_guard(description: str) -> Optional[MainHeatingSystemType]: - raise NotImplementedError + """Deterministically resolve a High Heat Retention Storage Heater (HHRSH) + description, which the LLM funnelled into ``"Electric storage heaters, old"`` + (SAP 401) for want of an HHRSH archetype (#1376 / ADR-0044). + + HHRSH is a distinct RdSAP system (SAP Table 4a 409) with its own intrinsic + charge control (2404) — the *best* modern storage, not the *worst* old large- + volume type. This guard claims only the structured HHRSH phrasing and returns + ``None`` for every other description (the remaining storage subtypes the LLM + already classifies correctly, and varied phrasings), so they still reach the + LLM classifier via ``GuardedColumnClassifier``. + """ + if "high heat retention" in description.lower(): + return MainHeatingSystemType.ELECTRIC_STORAGE_HIGH_HEAT_RETENTION + return None