From 4fcd23455bafeef53aaacfe1782dc01ba6c8c6a3 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 3 Jul 2026 12:25:03 +0000 Subject: [PATCH] =?UTF-8?q?The=20multi-measure=20trigger=20fixture=20is=20?= =?UTF-8?q?a=20cert=20the=20sized=20ASHP=20alone=20cannot=20clear=20?= =?UTF-8?q?=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Golden cert 0330 now reaches band C on the dwelling-sized ASHP alone (ADR-0049), dropping its solid_floor_insulation companion; cert 0390 still fires three measures, so the per-measure trigger-attribute assertions move there (and gain the lighting triggers). Co-Authored-By: Claude Opus 4.8 --- tests/harness/test_report.py | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/tests/harness/test_report.py b/tests/harness/test_report.py index 7aa820a64..84330584e 100644 --- a/tests/harness/test_report.py +++ b/tests/harness/test_report.py @@ -30,9 +30,13 @@ _GOLDEN = ( _WITHIN_TOLERANCE = "0036-6325-1100-0063-1226" _DIVERGENT = "0240-0200-5706-2365-8010" -# 0330 fires all three trigger kinds: an uninsulated cavity wall (cavity fill), -# its dependent mechanical ventilation, and an uninsulated solid floor. -_THREE_MEASURES = "0330-2249-8150-2326-4121" +# 0390 fires three measures — an uninsulated solid floor, low-energy lighting, +# and the ASHP bundle — so every fired measure's trigger attributes are +# exercised together. (0330, the previous fixture, now reaches band C on the +# correctly-sized ASHP alone: ADR-0049 sizes the pump to the dwelling's design +# heat loss, so the undersized-pump-era companion solid_floor_insulation is no +# longer needed there.) +_THREE_MEASURES = "0390-2254-6420-2126-5561" def _triggers_by_measure(report: PropertyReport) -> dict[str, MeasureTrigger]: @@ -80,17 +84,12 @@ def test_each_fired_measure_carries_the_attributes_that_triggered_it() -> None: # Assert — the Plan ran and every fired measure names its trigger fields. assert report.plan is not None assert report.plan_error is None - # The gain-maximising package: the efficient representative ASHP (ADR-0025) - # plus solid-floor insulation. The cavity wall + its forced mechanical - # ventilation (ADR-0016) are NOT selected — the wall earns +SAP alone but - # the forced-ventilation penalty makes the pair net-negative, so the - # Optimiser correctly leaves them out (see test_measure_dependency / - # test_optimiser for the forced-edge unit coverage; cavity_wall + - # mechanical_ventilation trigger fields are exercised in - # test_cavity_wall_recommendation / the ventilation generator tests). + # The selected package: the dwelling-sized ASHP (ADR-0025/ADR-0049) plus + # solid-floor insulation and low-energy lighting. triggers: dict[str, MeasureTrigger] = _triggers_by_measure(report) assert set(triggers) == { "solid_floor_insulation", + "low_energy_lighting", "air_source_heat_pump", } # Solid-floor insulation fired off an uninsulated solid ground floor. @@ -98,6 +97,12 @@ def test_each_fired_measure_carries_the_attributes_that_triggered_it() -> None: "floor_insulation_thickness": None, "floor_construction_type": "Solid", } + # Low-energy lighting fired off the dwelling's lodged bulb counts. + assert triggers["low_energy_lighting"].triggers == { + "incandescent_fixed_lighting_bulbs_count": 0, + "cfl_fixed_lighting_bulbs_count": 0, + "low_energy_fixed_lighting_bulbs_count": 9, + } # The ASHP bundle fired off the gas-dwelling main it replaces. assert triggers["air_source_heat_pump"].triggers == { "property_type": "0",