The multi-measure trigger fixture is a cert the sized ASHP alone cannot clear 🟩

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 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-03 12:25:03 +00:00
parent ac2b600bbd
commit 4fcd23455b

View file

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