diff --git a/domain/epc/property_overrides/glazing_mix_guard.py b/domain/epc/property_overrides/glazing_mix_guard.py index 5d59e4fa1..05b0fb2b0 100644 --- a/domain/epc/property_overrides/glazing_mix_guard.py +++ b/domain/epc/property_overrides/glazing_mix_guard.py @@ -17,11 +17,12 @@ _PERCENT_TYPE = re.compile( # One base type at or above this share is a uniform assertion, not a mix — applied # as that type (a near-uniform reglaze), not deferred. _UNIFORM_THRESHOLD_PERCENT = 90 -# A dominant base type + stated era → the fully-determined canonical member. Single -# glazing is era-free, so it needs no era. Double/triple with no (or non-canonical) -# era is absent here and falls through to the LLM. +# A dominant base type + stated era → the fully-determined canonical member. +# Single and secondary glazing are era-free, so they need no era. Double/triple +# with no (or non-canonical) era is absent here and falls through to the LLM. _DOMINANT_MEMBER: dict[tuple[str, Optional[str]], GlazingType] = { ("single", None): GlazingType.SINGLE, + ("secondary", None): GlazingType.SECONDARY, ("double", "2002 or later"): GlazingType.DOUBLE_POST_2002, ("double", "pre-2002"): GlazingType.DOUBLE_PRE_2002, ("triple", "2002 or later"): GlazingType.TRIPLE_POST_2002, @@ -51,9 +52,9 @@ def glazing_mix_guard(description: str) -> Optional[GlazingType]: * ``MIXED`` for a genuine mix — two or more glazing types present and none dominant (≥ the uniform threshold); * the fully-determined member for a dominant near-uniform split whose type - carries no era ambiguity — single glazing (era-free), or a dominant - double/triple whose era is stated ("pre-2002" / "2002 or later"); the LLM - would otherwise flatten such a split onto its *minority* type; + carries no era ambiguity — single or secondary glazing (era-free), or a + dominant double/triple whose era is stated ("pre-2002" / "2002 or later"); + the LLM would otherwise flatten such a split onto its *minority* type; * ``None`` otherwise — an unparseable description, or a dominant double/triple with an unstated/non-canonical era ("unknown age") that still carries genuine era ambiguity — so the LLM classifier resolves it.