Model/repositories
Jun-te Kim daa1cd7967 feat(address2uprn): withhold ambiguous cross-row UPRN matches (ADR-0057)
Phase 1 of confirming UPRNs before finalise. address2uprn matched each
row independently, so one UPRN could be the best match for two distinct
addresses (a coarse EPC record absorbing several real addresses, e.g.
flats in a block). Those distinct addresses were then silently merged by
the property identity insert, and collided in property_overrides.

resolve_group_ambiguity() withholds a UPRN claimed by >=2 distinct
normalised addresses within a postcode group (keeps genuine same-address
re-listings), and the handler now emits an address2uprn_status column
(matched | ambiguous_duplicate | unmatched | invalid_postcode | error).
Withheld rows drop to a null UPRN but keep their lexiscore for triage on
the (upcoming) confirmation page.

Also adds the ADR-0057 backstop dedup in property_overrides upsert_all so
the ON CONFLICT statement can never double-touch a row.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 15:15:59 +00:00
..
bulk_upload tests files 2026-06-04 11:47:42 +00:00
comparable_properties Merge remote-tracking branch 'origin/main' into feature/e2e-runs 2026-06-23 17:07:27 +00:00
epc An expired-source EPC occupies the predicted slot without stranding rows 🟩 2026-07-06 08:33:16 +00:00
fuel_rates Load the off-peak day/night rate from the committed snapshot 🟩 2026-06-24 17:20:19 +00:00
geospatial feat(geospatial): batch coordinates_for_uprns lookup (#1227) 2026-06-15 14:35:32 +00:00
historic_epc Resolve a UPRN to its historic EPC record by exact match 🟩 2026-07-06 08:17:54 +00:00
hubspot_deals The deal row names the job number client_booking_reference, matching HubSpot and the schema 🟪 2026-07-07 12:43:40 +00:00
landlord_overrides property override 2026-06-05 12:18:13 +00:00
magic_plan correct imports in postgres repo 2026-06-09 14:25:29 +00:00
materials feat(first-run): FirstRunPipeline E2E — Ingestion → Baseline → Modelling (#1136) 2026-06-01 16:28:48 +00:00
plan Batch plan saves reduce RDS CPU during bulk modelling runs 🟪 2026-06-29 15:08:47 +00:00
product Hold one DB connection per modelling_e2e invocation 2026-06-24 16:58:21 +00:00
property feat(address2uprn): withhold ambiguous cross-row UPRN matches (ADR-0057) 2026-07-07 15:15:59 +00:00
property_baseline refactor(property-baseline): rename baseline → property_baseline aggregate (PR #1139 review) 2026-06-01 16:28:48 +00:00
scenario refactor(modelling): consolidate scenario + installed_measure into the subpackage 2026-06-03 22:52:35 +00:00
solar perf(modelling_e2e): bulk reads and batch writes to cut RDS load 2026-06-24 18:43:42 +00:00
spatial feat(spatial): per-UPRN cache repo for the OS spatial reference 2026-06-04 17:15:51 +00:00
tasks perf(modelling_e2e): batch SubTask bookkeeping to stop per-property writes 2026-06-24 19:26:42 +00:00
unstandardised_address updated rdsap option; seperated s3 location in infrastrucutre; added open ai api 2026-05-22 14:00:33 +00:00
uploaded_file UploadedFilePostgresRepository returns latest uploaded file by deal ID and type 🟩 2026-06-09 11:54:14 +00:00
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
postgres_unit_of_work.py Resolve overrides on the unit's own session, not a second connection 2026-06-24 17:01:41 +00:00
unit_of_work.py feat(repositories): expose the spatial cache repo on the Unit of Work 2026-06-04 17:20:39 +00:00