Model/tests/orchestration
Daniel Roth f7328f54c5 Fetch a property's lodged EPC by UPRN, not property_id
An epc_property row can carry a null property_id (FE/historic ingestion
persists EPC rows never linked to a property row), so a property_id-keyed
read silently misses them. UPRN is the durable key both the property row
and the epc_property row share. Repoint the lodged reads (get_for_property
+ get_for_properties) onto UPRN; the predicted reads stay on property_id
because a predicted EPC deep-copies a neighbour's UPRN, so its UPRN column
is never the property's own.

UPRN is not unique on epc_property, so the read tie-break is now load-
bearing (it was dormant under property_id, where the write path guarantees
one lodged row per property): the most recently ingested (highest-id) row
wins. Write path stays keyed on (property_id, source).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 10:35:51 +00:00
..
audit_generator move spreadsheet population logic to domain 2026-06-09 14:43:24 +00:00
magic_plan UploadedFile, FileTypeEnum, FileSourceEnum importable from infrastructure.postgres.uploaded_file_table 🟩 2026-06-09 11:50:51 +00:00
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
fakes.py Fetch a property's lodged EPC by UPRN, not property_id 2026-07-14 10:35:51 +00:00
test_abri_orchestrator_abandon_job.py Date an abandonment to the deal's own dates, not now() 🟩 2026-07-08 08:51:39 +00:00
test_abri_orchestrator_amend_job.py Always send a bookable resource on Abri amend_job 2026-07-10 10:37:35 +00:00
test_abri_orchestrator_log_job.py A changed booking amends the deal's OpenHousing appointment 🟩 2026-07-07 10:01:01 +00:00
test_abri_orchestrator_tenant_data_sync.py A changed booking amends the deal's OpenHousing appointment 🟩 2026-07-07 10:01:01 +00:00
test_ara_first_run_pipeline.py feat(modelling): ModellingOrchestrator persists a Plan end-to-end (#1157) 2026-06-03 12:08:32 +00:00
test_ara_first_run_pipeline_integration.py Fetch a property's lodged EPC by UPRN, not property_id 2026-07-14 10:35:51 +00:00
test_build_canonical_filename.py move tests out of scripts/ 2026-06-15 11:11:08 +00:00
test_bulk_document_download_orchestrator.py Bulk download: readable email, deal-name folders, visible worker logs 2026-07-08 15:02:38 +00:00
test_bulk_upload_finaliser_orchestrator.py feat(modelling): mark a Property as run via has_recommendations + updated_at 2026-06-16 23:34:33 +00:00
test_first_run_without_database.py feat(modelling): run_one console entrypoint for DB-less inspection 2026-06-04 08:14:14 +00:00
test_ingestion_orchestrator.py 17.1 and 18 done by claude 2026-06-12 12:52:36 +00:00
test_ingestion_prediction.py Fetch a property's lodged EPC by UPRN, not property_id 2026-07-14 10:35:51 +00:00
test_landlord_description_overrides_orchestrator.py Group landlord property-override enums under domain/epc/property_overrides 🟪 2026-06-19 14:49:58 +00:00
test_modelling_fabric_first.py A Fabric First Scenario spends the budget on the envelope before heating 🟥 2026-07-09 11:44:31 +00:00
test_modelling_goal_objectives.py A goal-aligned scenario without a budget fails loudly 🟥 2026-07-10 11:10:06 +00:00
test_modelling_heat_pump_sizing_threading.py The orchestrator threads the dwelling design heat loss into ASHP sizing 🟥 2026-07-03 10:31:57 +00:00
test_modelling_solar_threading.py feat(modelling): gate generation by the considered-measures allowlist 2026-06-16 14:56:09 +00:00
test_postcode_splitter_orchestrator.py updated rdsap option; seperated s3 location in infrastrucutre; added open ai api 2026-05-22 14:00:33 +00:00
test_property_baseline_orchestrator.py ASHP sizing targets the Appendix-N efficiency peak (realistic installed pump) 🟩 2026-07-03 11:02:13 +00:00
test_task_orchestrator.py Test names state the surviving failure-recovery behaviors 🟪 2026-07-07 11:12:12 +00:00