Model/orchestration
Jun-te Kim 6679d8c621 Fall back to computed kWh for predicted-EPC baselines (no lodged RHI)
16 modelling_e2e properties failed with "Effective EPC is missing
renewable_heat_incentive; cannot read baseline space-heating / hot-water kWh".

Baseline runs for predicted properties too (ADR-0031), reading space/water-
heating kWh off the EPC's lodged RHI block. Predicted EPCs deep-copy a neighbour
template that may carry no RHI, so `_require_rhi` hard-failed the whole subtask.

Fix: when the EPC has no RHI, fall back to the property's OWN computed figures
from the scored SapResult (space_heating_kwh_per_yr / hot_water_kwh_per_yr) —
more representative than a neighbour's lodged numbers. Only when there is also no
SapResult (the rebaseliner scored nothing) is there genuinely no demand to
record, and we still fail noisily. Lodged certs are unchanged (RHI still wins).

Regression tests: fallback-to-computed, and the no-RHI/no-result raise.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 08:58:24 +00:00
..
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
ara_first_run_pipeline.py feat(modelling): ModellingOrchestrator persists a Plan end-to-end (#1157) 2026-06-03 12:08:32 +00:00
audit_generator_orchestrator.py populate_sheet writes to new Sero template column layout 🟩 2026-06-10 13:21:50 +00:00
audit_generator_unit_of_work.py Audit generator populates XLSX, uploads to S3, and records UploadedFile row 🟥 2026-06-09 11:59:09 +00:00
bulk_upload_finaliser_orchestrator.py Group landlord property-override enums under domain/epc/property_overrides 🟪 2026-06-19 14:49:58 +00:00
classifiable_column.py moved classifier data transformation to an easy one 2026-06-01 14:53:34 +00:00
ingestion_orchestrator.py refactor(epc-prediction): PR review — rename ComparableProperty, relocate PredictionTarget 2026-06-16 13:34:44 +00:00
landlord_description_overrides_orchestrator.py tests wrong environemnt 2026-05-29 16:17:06 +00:00
magic_plan_orchestrator.py UploadedFile, FileTypeEnum, FileSourceEnum importable from infrastructure.postgres.uploaded_file_table 🟩 2026-06-09 11:50:51 +00:00
modelling_orchestrator.py measured excluded plus get geospatial nearby stuff working 2026-06-22 16:12:16 +00:00
postcode_splitter_orchestrator.py standardist Address 2026-05-22 10:13:32 +00:00
property_baseline_orchestrator.py Fall back to computed kWh for predicted-EPC baselines (no lodged RHI) 2026-06-24 08:58:24 +00:00
sharepoint_renamer_orchestrator.py ignore jpg and heic files. resolve filepath relatively 2026-06-16 10:06:39 +00:00
task_orchestrator.py get rid of comments 2026-05-20 13:21:11 +00:00