Model/repositories/property
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
..
__init__.py feat(property): Property aggregate + PropertyRepository (#1132) 2026-05-30 19:39:54 +00:00
in_memory_property_overrides_reader.py Hold one DB connection per modelling_e2e invocation 2026-06-24 16:58:21 +00:00
landlord_override_overlays.py Treat a same-family fuel refinement as consistent, not a mismatch 🟩 2026-06-30 17:18:51 +00:00
override_backed_prediction_attributes_reader.py Group landlord property-override enums under domain/epc/property_overrides 🟪 2026-06-19 14:49:58 +00:00
prediction_target_attributes_reader.py feat(epc-prediction): slice-5d target assembly + eligibility gate 2026-06-16 03:56:57 +00:00
property_override_postgres_repository.py feat(address2uprn): withhold ambiguous cross-row UPRN matches (ADR-0057) 2026-07-07 15:15:59 +00:00
property_override_repository.py feat(address2uprn): withhold ambiguous cross-row UPRN matches (ADR-0057) 2026-07-07 15:15:59 +00:00
property_overrides_postgres_reader.py perf(modelling_e2e): bulk reads and batch writes to cut RDS load 2026-06-24 18:43:42 +00:00
property_overrides_reader.py Read a Property's resolved landlord overrides as a faithful value-space snapshot 🟩 2026-06-16 15:14:53 +00:00
property_postgres_repository.py Run the fuel-mismatch check on every Property's resolved overrides 🟩 2026-06-30 17:21:32 +00:00
property_repository.py feat(modelling): mark a Property as run via has_recommendations + updated_at 2026-06-16 23:34:33 +00:00