Cavity fill 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:41:02 +00:00
parent 7c8b161653
commit 5f74c34f9a

View file

@ -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