The Dwelling-Roof Cap bounds Sub-Ladder rungs too 🟩

Pins that the unchanged cap regime (min of 0.7×Google and the ADR-0038
budget) flows into ADR-0058 derivation — no red phase; the tracer
implementation passed the already-min'd cap through.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-07 22:08:28 +00:00
parent 1756976d7e
commit 024a01b128

View file

@ -373,3 +373,20 @@ def test_roof_capped_below_two_panels_still_yields_no_configs() -> None:
# Assert
assert configs == ()
def test_dwelling_roof_cap_bounds_the_sub_ladder_too() -> None:
# ADR-0058 — the cap regime is unchanged: when the Dwelling-Roof Cap
# (ADR-0038) resolves BELOW the 0.7×Google cap, it bounds the Sub-Ladder
# rungs as well — a conflated Google roof can't inflate even a small array.
# Arrange — max 6 (0.7 cap = 4.2) with Google's ladder starting at 4;
# a ~8.5 m² dwelling roof caps at ≈2.5 panels → only the 2-panel rung.
potential = _potential_with_panel_dims(max_panels=6, panel_counts=(4,))
# Act
configs = select_conservative_configs(potential, dwelling_roof_area_m2=8.5)
# Assert — one rung at 2 panels, pro-rata off the 4-panel rung's 400.
assert [c.panels_count for c in configs] == [2]
assert [c.yearly_energy_dc_kwh for c in configs] == [200.0]