From 5f74c34f9ab610a0d793652d4b46a5f3c4bd31cd Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 3 Jul 2026 11:41:02 +0000 Subject: [PATCH] =?UTF-8?q?Cavity=20fill=20is=20withheld=20when=20it=20can?= =?UTF-8?q?not=20lower=20the=20derived=20wall=20U=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 --- .../modelling/test_wall_recommendation.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/domain/modelling/test_wall_recommendation.py b/tests/domain/modelling/test_wall_recommendation.py index 8fe2620d4..993d7a856 100644 --- a/tests/domain/modelling/test_wall_recommendation.py +++ b/tests/domain/modelling/test_wall_recommendation.py @@ -90,6 +90,24 @@ def test_non_cavity_main_wall_yields_no_recommendation() -> None: assert recommendation is None +def test_at_regs_age_band_cavity_yields_no_cavity_fill_recommendation() -> None: + # Arrange — a cavity wall lodged as-built at construction age band L + # (2012-2022): the as-built cascade already assigns the at-regs U-value, so + # filling the cavity cannot lower it. The Wall U-Value Gate withholds the + # Option (ADR-0051); the legacy insulation-state trigger alone would offer + # a paid no-op. + baseline: EpcPropertyData = build_epc() # MAIN: cavity (4), uninsulated (4) + _part(baseline, BuildingPartIdentifier.MAIN).construction_age_band = "L" + + # Act + recommendation: Recommendation | None = recommend_cavity_wall( + baseline, _StubProducts() + ) + + # Assert + 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