From 63c889bd027c054c43c809bd3b441b04b4bd4a54 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Thu, 2 Jul 2026 11:09:07 +0000 Subject: [PATCH] =?UTF-8?q?Roof=20dispatcher=20docstring=20and=20constants?= =?UTF-8?q?=20reflect=20the=20sentinel-aware=20pitched=20trigger=20?= =?UTF-8?q?=F0=9F=9F=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- .../modelling/generators/roof_recommendation.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/domain/modelling/generators/roof_recommendation.py b/domain/modelling/generators/roof_recommendation.py index f20a5103a..5d2c1cd0c 100644 --- a/domain/modelling/generators/roof_recommendation.py +++ b/domain/modelling/generators/roof_recommendation.py @@ -1,13 +1,15 @@ """The roof Recommendation Generator. Dispatches the MAIN roof to its single applicable insulation Measure by roof -type (ADR-0021): a sloping ceiling (rafters, 100 mm), or — the fallback — a -loft / thatched / unlodged pitched roof (joists, 300 mm); a no-access roof gets -nothing. Each emits one "Roof" Recommendation whose Option carries the +type (ADR-0021): a sloping or vaulted ceiling (rafters, 100 mm), a flat roof +(200 mm), or — the fallback — a loft / thatched / unlodged pitched roof +(joists, 300 mm); a no-access roof gets nothing. The pitched branches resolve +a lodged sentinel thickness ("ND" / nothing) to the age band's as-built state +(ADR-0047). Each emits one "Roof" Recommendation whose Option carries the insulation Simulation Overlay (raising `roof_insulation_thickness`) and a priced Cost (roof area x the Product's fully-loaded unit cost, with its contingency). -Flat-roof and room-in-roof branches land in later slices. No scoring, no -persistence — impact is produced later by scoring (ADR-0016). +The room-in-roof branch lands in a later slice. No scoring, no persistence — +impact is produced later by scoring (ADR-0016). """ from typing import Final, Optional, Union @@ -24,9 +26,6 @@ from repositories.product.product_repository import ProductRepository _LOFT_MEASURE_TYPE = MeasureType.LOFT_INSULATION _SLOPING_CEILING_MEASURE_TYPE = MeasureType.SLOPING_CEILING_INSULATION -# RdSAP 10 Table 16: 0 mm lodged roof insulation is an uninsulated loft. The -# Elmhurst mapper resolves "As Built" to 0 for pitched/sloping/loft roofs. -_ROOF_UNINSULATED_MM = 0 # Recommended loft-insulation depth (mm). Elmhurst re-lodges a loft-insulation # measure at 300 mm; pinning the before→after cascade (000490/001431) requires # the overlay to match that depth exactly (see test_elmhurst_cascade_pins).