Model/tests/domain
Khalim Conn-Kowlessar e136e937d6 fix(heat-transmission): match roof description per part by kind (RdSAP 10 §5.11)
The deduplicated `epc.roofs[]` list cannot be indexed 1:1 against the
building parts (190/329 multi-part certs have len(roofs) != len(parts)),
so every part's `u_roof` consumed a SINGLE join of all roof descriptions.
That leaked one part's insulation state onto another: a "Flat, no
insulation" extension dragged a "Pitched, insulated (assumed)" main roof
to the uninsulated 2.30, ~3x over-stating its heat loss. 3-part certs
systematically under-rated (56% within-0.5, mean -0.79 SAP).

Partition the non-RR roof descriptions into flat vs pitched/sloping and
match each part to its own kind (`_main_roof_descriptions_by_kind`),
falling back to the global join when a part's kind has no matching entry.

Corpus cert 100010129331: roof 110.5 -> 31.3 W/K, +13.10 -> -0.05 SAP.
RdSAP-21.0.1 within-0.5 68.8% -> 69.5% (MAE 0.888 -> 0.859; PE 13.9 ->
13.6); 3-part cohort 56% -> 61%. Floors/ceilings ratcheted. Pinned in
test_heat_transmission (by_kind split + mixed-roof no-contamination).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 00:48:50 +00:00
..
addresses standardist Address 2026-05-22 10:13:32 +00:00
billing refactor(billing): relocate Bill Derivation to domain/billing/ (cross-stage) 2026-06-03 17:19:23 +00:00
epc_prediction refactor(epc-prediction): PR review — rename ComparableProperty, relocate PredictionTarget 2026-06-16 13:34:44 +00:00
fuel_rates feat(fuel-rates): FuelRates snapshot + repository foundation (ADR-0014) 2026-06-02 09:29:07 +00:00
magicplan handle 50 rows in new template file 2026-06-10 16:18:46 +00:00
modelling feat(modelling): drive measure scoping from the Scenario's exclusions 2026-06-16 15:26:25 +00:00
property feat(epc-prediction): slice-5a predicted source path on Property 2026-06-16 03:33:47 +00:00
property_baseline feat(baseline): sap_code_to_fuel normalizes via the calculator's own helper 2026-06-05 18:59:25 +00:00
sap10_calculator fix(heat-transmission): match roof description per part by kind (RdSAP 10 §5.11) 2026-06-17 00:48:50 +00:00
tasks tests framework completed 2026-05-20 14:00:19 +00:00
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
test_building_geometry.py feat(modelling): floor Recommendation Generator + ground-floor-area geometry 2026-06-03 09:12:29 +00:00
test_postcode.py tests framework completed 2026-05-20 14:00:19 +00:00