From 1756976d7eef972149b262638bcdcbc34f9ed638 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 7 Jul 2026 22:07:39 +0000 Subject: [PATCH] =?UTF-8?q?A=20roof=20capped=20below=20two=20panels=20is?= =?UTF-8?q?=20still=20offered=20no=20PV=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pins the ADR-0058 install floor delivered with the tracer slice (rung_max < 2 returns empty) — no red phase. Co-Authored-By: Claude Fable 5 --- .../modelling/test_solar_config_selection.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/domain/modelling/test_solar_config_selection.py b/tests/domain/modelling/test_solar_config_selection.py index 6aae14dd9..01dba8533 100644 --- a/tests/domain/modelling/test_solar_config_selection.py +++ b/tests/domain/modelling/test_solar_config_selection.py @@ -348,3 +348,28 @@ def test_sub_ladder_rungs_never_take_from_north_planes() -> None: assert [c.panels_count for c in configs] == [2, 3] assert [c.yearly_energy_dc_kwh for c in configs] == [639.0, 958.5] assert all(s.azimuth_degrees == 180.0 for c in configs for s in c.segments) + + +def test_roof_capped_below_two_panels_still_yields_no_configs() -> None: + # ADR-0058 — the install floor: a roof whose cap resolves below 2 panels + # is never offered PV. Max 2 → cap 1.4 < 2; the ladder cliff is the + # correct outcome here, not a Sub-Ladder rung. + + # Arrange + potential = SolarPotential( + panel_capacity_watts=400.0, + max_array_panels_count=2, + configurations=( + SolarPanelConfiguration( + panels_count=2, + yearly_energy_dc_kwh=640.0, + segments=(_segment(2, 180.0, 640.0),), + ), + ), + ) + + # Act + configs = select_conservative_configs(potential) + + # Assert + assert configs == ()