mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Two reconciliations to make the modelling_e2e Lambda handler production-ready. 1. Price through the off-catalogue overlay, drop the workarounds The handler priced through a plain ProductPostgresRepository and excluded secondary_heating_removal / system_tune_up / system_tune_up_zoned to dodge ProductNotFound (and a poisoning pgEnum DataError). Those measures are now priced by catalogue_with_off_catalogue_overrides (already used by the e2e runner and PostgresUnitOfWork), so the exclusions are removed and ALL measure types are considered. This also fixes gas-boiler / single-glazed properties, which Dan's handler never excluded and so still crashed (the standard system_tune_up option is built unconditionally — the considered-measures exclusion never actually gated it). 2. Broaden the EPC-Prediction cohort to nearby real postcodes (ADR-0031) A property with no lodged EPC and no same-type comparable in its own postcode (e.g. the only flat among houses) used to gate out and fail the subtask. The gov EPC API cannot search by radius/outcode, so we resolve the real unit postcodes physically nearest the target via postcodes.io (keyless; already a trusted in-repo dependency) and walk them nearest-first until enough same-type comparables surface. New PostcodesIoClient (transient-failure retry with exponential backoff, soft-failing to the seed so broadening never breaks prediction) and EpcComparablePropertiesRepository.candidates_near. Wired into the handler and e2e runner; broadening is lazy (only on gate-out) and memoised per (postcode, property_type). Validated live: property 728476 (gas boiler) prices system_tune_up at GBP295; property 718580 (lone flat in BR6 6BS) now predicts via nearby BR6 postcodes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| eon | ||
| hyde | ||
| lisasrequest | ||
| analyse_api_sap_clusters.py | ||
| build_epc_prediction_fixture.py | ||
| compare_epc_paths.py | ||
| decompose_api_cost_error.py | ||
| decompose_co2_pe_error.py | ||
| dive_cert.py | ||
| download_cotality_evidence.py | ||
| e2e_common.py | ||
| elmhurst_input_sheet.py | ||
| eval_api_sap_accuracy.py | ||
| fetch_2026_epc_sample.py | ||
| fetch_cohort2_api_jsons.py | ||
| fetch_corpus_coordinates.py | ||
| fetch_epc_bulk_sample.py | ||
| fetch_epc_dump.py | ||
| fetch_epc_prediction_corpus.py | ||
| fetch_epc_prediction_dense_corpus.py | ||
| fetch_real_life_epc_sample.py | ||
| fill_domna_addresses.py | ||
| finalise_to_property_table.py | ||
| historic_epc_demo.py | ||
| hyde_epc_schema_versions.py | ||
| init_db.py | ||
| inspect_overlay.py | ||
| profile_api_error.py | ||
| profile_case34.py | ||
| profile_corpus_error.py | ||
| resolve_uprns_for_finaliser.py | ||
| run_audit_generator_local.py | ||
| run_first_run_e2e.py | ||
| run_modelling_cohort.py | ||
| run_modelling_e2e.py | ||
| run_property_report.py | ||
| trigger_modelling_e2e_sqs.py | ||
| validate_epc_prediction.py | ||