Model/repositories
Khalim Conn-Kowlessar 559ae1b4ec feat(repos): idempotent EPC + Baseline writes (replace by property_id) (#1138)
Re-runs of a First Run batch re-save a property's data; that must replace,
not duplicate (ADR-0012 idempotent batch writes).

- `EpcPostgresRepository.save` deletes the property's existing EPC graph
  (parent + all child tables, floor-dims via their building parts) before
  inserting, when a `property_id` is given. Anonymous saves still insert.
- `BaselinePostgresRepository.save` deletes the existing row for the
  `property_id` before inserting — no more unique-constraint violation on
  re-save; also what the re-score-on-override path needs.
- Solar already upserts, so it's unchanged.

The #1129 round-trip fidelity test stays green (delete-first is a no-op on
a first save). 2 new tests (re-save replaces, not duplicates). pyright
strict clean; AAA.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 09:41:39 +00:00
..
baseline feat(repos): idempotent EPC + Baseline writes (replace by property_id) (#1138) 2026-05-31 09:41:39 +00:00
epc feat(repos): idempotent EPC + Baseline writes (replace by property_id) (#1138) 2026-05-31 09:41:39 +00:00
geospatial feat(geospatial): GeospatialRepo — OS Open-UPRN coordinate lookup (#1131) 2026-05-30 19:55:46 +00:00
materials feat(first-run): FirstRunPipeline E2E — Ingestion → Baseline → Modelling (#1136) 2026-05-30 22:32:58 +00:00
property feat(property): Property aggregate + PropertyRepository (#1132) 2026-05-30 19:39:54 +00:00
scenario feat(first-run): FirstRunPipeline E2E — Ingestion → Baseline → Modelling (#1136) 2026-05-30 22:32:58 +00:00
solar feat(ingestion): relocate EpcClientService to infrastructure + SolarRepo (#1133) 2026-05-30 19:45:26 +00:00
tasks added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
user_address tests framework completed 2026-05-20 14:00:19 +00:00
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
postgres_unit_of_work.py feat(uow): UnitOfWork port + PostgresUnitOfWork adapter (#1138) 2026-05-31 09:25:17 +00:00
unit_of_work.py feat(uow): UnitOfWork port + PostgresUnitOfWork adapter (#1138) 2026-05-31 09:25:17 +00:00