Floor insulation is withheld when it cannot lower the derived floor U 🟥

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-03 16:05:04 +00:00
parent 838668bfdb
commit 128981289a

View file

@ -66,6 +66,28 @@ def test_uninsulated_solid_floor_yields_solid_insulation() -> None:
assert recommendation.options[0].measure_type == "solid_floor_insulation"
def test_at_regs_age_band_floor_yields_no_recommendation() -> None:
# Arrange — a solid ground floor lodged as-built at construction age band
# L (2012-2022). RdSAP's BS EN ISO 13370 cascade assigns it the at-regs
# U-value and 100 mm of added insulation resolves to the same (or a
# no-better) value — the measure cannot change the modelled floor, so
# offering it sells £3-4k of insulation for +0.00 SAP (portfolio 796:
# properties 709782/709790). The Floor U-Value Gate withholds it — the
# floor arm of ADR-0051's deferred follow-up.
baseline: EpcPropertyData = build_epc()
main: SapBuildingPart = _main(baseline)
main.floor_construction_type = "Solid"
main.construction_age_band = "L"
# Act
recommendation: Recommendation | None = recommend_floor_insulation(
baseline, _StubProducts()
)
# Assert
assert recommendation is None
def test_already_insulated_floor_yields_no_recommendation() -> None:
# Arrange
baseline: EpcPropertyData = build_epc()