Model/tests
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
..
applications feat(ara): AraFirstRunTriggerBody + ara_first_run lambda skeleton (#1130) 2026-05-30 20:38:15 +00:00
domain feat(baseline): BaselineOrchestrator + BaselinePerformance aggregate (#1135) 2026-05-30 21:21:34 +00:00
infrastructure GoogleSolarApi translates BuildingInsightsNotFoundError to sentinel dict 🟩 2026-05-21 16:06:54 +00:00
orchestration feat(first-run): FirstRunPipeline E2E — Ingestion → Baseline → Modelling (#1136) 2026-05-30 22:32:58 +00:00
repositories feat(repos): idempotent EPC + Baseline writes (replace by property_id) (#1138) 2026-05-31 09:41:39 +00:00
utilities 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
conftest.py tests framework completed 2026-05-20 14:00:19 +00:00