Resolve the boiler archetype by fuel when building a property's overlays 🟩

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-24 09:20:07 +00:00
parent abbad2b44d
commit f83f8f43cd

View file

@ -90,7 +90,15 @@ def overlays_from(overrides: ResolvedPropertyOverrides) -> list[EpcSimulation]:
mapper = _COMPONENT_OVERLAYS.get(row.override_component)
if mapper is None:
continue
overlay = mapper(row.override_value, row.building_part)
value = row.override_value
if row.override_component == "main_heating_system":
# A fuel-agnostic gas-boiler archetype re-points to the oil / solid-fuel
# member matching this property's `main_fuel`, so an oil/solid boiler
# scores its own code — not the gas default the LLM assigned (ADR-0067).
value = resolve_boiler_archetype(
value, _override_value(overrides, "main_fuel")
)
overlay = mapper(value, row.building_part)
if overlay is not None:
overlays.append(overlay)
return overlays