mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-08-03 05:18:22 +00:00
refetch_epc=True fetched a fresh cert but the recency tie-break (strict >) dropped it whenever the stored row shared the cert's inspection date — so a row written before a schema field/table existed (e.g. room-in-roof geometry) could never be healed by re-fetching. The dwelling was modelled on stale fabric indefinitely. Reconcile instead of just comparing dates: on an equal inspection date, refresh a public gov cert (uploaded_file_id NULL) when the fetched cert differs from the stored one, so a plain re-fetch re-ingests it. One of our own surveys (PasHub / ECMK / Elmhurst — uploaded_file_id set) is preserved on the tie, keeping the survey-wins rule (ADR-0001 / #1589); an unchanged public cert is still not re-persisted. `_reconcile_lodged` layers the content refresh over `_newer_lodged` (recency untouched). New `EpcRepository.survey_lodged_uprns` surfaces the row-level uploaded_file_id provenance the hydrated EpcPropertyData drops. Together with the property_id-anchored persist, a refetch_epc=True re-run now heals both a missing epc_property row and a stale one. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| audit_generator | ||
| magic_plan | ||
| __init__.py | ||
| fakes.py | ||
| test_abri_orchestrator_abandon_job.py | ||
| test_abri_orchestrator_amend_job.py | ||
| test_abri_orchestrator_log_job.py | ||
| test_abri_orchestrator_tenant_data_sync.py | ||
| test_ara_first_run_pipeline.py | ||
| test_ara_first_run_pipeline_integration.py | ||
| test_build_canonical_filename.py | ||
| test_bulk_document_download_orchestrator.py | ||
| test_bulk_upload_finaliser_orchestrator.py | ||
| test_first_run_without_database.py | ||
| test_ingestion_orchestrator.py | ||
| test_ingestion_prediction.py | ||
| test_landlord_description_overrides_orchestrator.py | ||
| test_modelling_baseline_coherence.py | ||
| test_modelling_fabric_first.py | ||
| test_modelling_goal_band_floor.py | ||
| test_modelling_goal_objectives.py | ||
| test_modelling_heat_pump_sizing_threading.py | ||
| test_modelling_solar_threading.py | ||
| test_pashub_fetcher_orchestrator.py | ||
| test_postcode_splitter_orchestrator.py | ||
| test_property_baseline_orchestrator.py | ||
| test_scenario_export_orchestrator.py | ||
| test_task_orchestrator.py | ||