Underfloor overrides no longer log an incomplete companion set 🟩

Regression guard: category 8 + control 2701 keep the ADR-0048 coherence
invariant satisfied for SAP codes 421/422/424.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-03 11:37:57 +00:00
parent 07362b357a
commit 573588d4e7

View file

@ -285,6 +285,28 @@ def test_electric_underfloor_drags_the_conservative_group_7_control(
assert simulation.heating.main_heating_control == 2701
@pytest.mark.parametrize(
"main_heating_value",
[
"Electric underfloor, in concrete slab (off-peak)",
"Electric underfloor, integrated storage and direct-acting",
"Electric underfloor, in screed above insulation",
],
)
def test_complete_underfloor_overlay_does_not_log_a_companion_gap(
main_heating_value: str, caplog: pytest.LogCaptureFixture
) -> None:
# Electric underfloor now resolves a full companion set (category 8 +
# control 2701, ADR-0050), so the overlay must NOT log an
# incomplete-companion gap — guarding that the set stays complete.
# Act
with caplog.at_level(logging.ERROR):
main_heating_overlay_for(main_heating_value, 0)
# Assert
assert "incomplete companion set" not in caplog.text
def test_screed_underfloor_defers_the_meter_to_the_cert() -> None:
# "In screed above insulation (standard or off peak)" is tariff-ambiguous (81%
# of the corpus lodge off-peak), so the archetype cannot know the meter — it