Solid-wall insulation is withheld when it cannot lower the derived wall U 🟥

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-03 11:39:32 +00:00
parent 573588d4e7
commit 574e58a5c8

View file

@ -90,6 +90,28 @@ def test_non_cavity_main_wall_yields_no_recommendation() -> None:
assert recommendation is None
def test_at_regs_age_band_wall_yields_no_solid_wall_recommendation() -> None:
# Arrange — a timber-frame wall lodged as-built at construction age band L
# (2012-2022). RdSAP's cascade assigns it the at-regs U-value (0.28), and
# 100 mm IWI resolves to the SAME value — the measure cannot change the
# modelled wall, so offering it sells £4k of insulation for +0.00 SAP
# (property 711795, PRD #1435 WS2). The Wall U-Value Gate withholds it
# (ADR-0051).
baseline: EpcPropertyData = build_epc()
main: SapBuildingPart = _part(baseline, BuildingPartIdentifier.MAIN)
main.wall_construction = 5 # timber frame — IWI-only construction
main.wall_insulation_type = 4 # as-built / uninsulated — the legacy trigger
main.construction_age_band = "L"
# Act
recommendation: Recommendation | None = recommend_solid_wall(
baseline, _StubProducts()
)
# Assert
assert recommendation is None
def test_park_home_wall_yields_no_solid_wall_recommendation() -> None:
# Arrange — a park home (wall_construction code 8) with an uninsulated
# as-built wall. Code 8 is NOT system-built (ADR-0019); a park home's