Defer an as-built sloping-ceiling override to the age-band default 🟩

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-23 13:25:37 +00:00
parent e89f5a3a5c
commit 9cccf83000

View file

@ -50,6 +50,12 @@ def _overlay_for(roof_type_value: str) -> Optional[BuildingPartOverlay]:
match = _LOFT_MM.search(roof_type_value)
if match is not None:
return BuildingPartOverlay(roof_insulation_thickness=int(match.group(1)))
if roof_type_value.startswith("Pitched, sloping ceiling"):
# ADR-0066: a slope-following ceiling (gov-API roof_construction 8) has no
# loft void. Assert the sloping-ceiling shape so the calculator's
# `is_pitched_sloping_ceiling` drives the Table 18 col (3) age-band default
# ("as built"), never the loft ladder. Leave thickness None here.
return BuildingPartOverlay(roof_construction_type="Pitched, sloping ceiling")
if roof_type_value.startswith("Flat,"):
flat_depth = _FLAT_MM.search(roof_type_value)
if flat_depth is not None: