Model/docs
Khalim Conn-Kowlessar fd43cf2d23 feat(epc-prediction): slice-5c predicted-EPC persistence slot
Add a `source` discriminator (lodged | predicted) to the EPC store so a Property
holds a lodged EPC and a predicted one (EPC Prediction gap-fill) at once
(ADR-0031). EpcRepository.save gains source="lodged"; idempotent delete is now
per-source (a predicted save no longer wipes lodged, and vice versa);
get_for_property/get_for_properties filter lodged; new get_predicted_for_property
/ get_predicted_for_properties read predicted. PropertyPostgresRepository.get +
get_many hydrate Property.predicted_epc, so the predicted picture reaches the
modelling read (both load via get_many). FakeEpcRepo mirrors the dual slot.

EpcPropertyModel gains `source` (default "lodged"); the test DB builds from the
SQLModel mirror so this is exercised without the prod migration. The matching
Drizzle change (column + per-(property_id,source) uniqueness) is the team's to
action before merge — docs/MIGRATION_NOTE_predicted_epc_source.md.

3 store tests (coexist, idempotent predicted re-save leaves lodged, lodged-only
has no predicted) + property-repo wiring; 85 pass across affected suites; new
code pyright-clean (2 pre-existing wwhrs errors in epc_property_table untouched).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 03:50:19 +00:00
..
adr docs(epc-prediction): ADR-0031 production wiring + CONTEXT gating rule 2026-06-16 03:23:12 +00:00
backlog move spreadsheet population logic to domain 2026-06-09 14:43:24 +00:00
grill-sessions scripts? 2026-06-11 07:07:27 +00:00
migrations Merge remote-tracking branch 'origin/main' into feature/bill-derivation 2026-06-05 11:09:00 +00:00
HANDOVER_API_ACCURACY_S2.md docs: session-2 API-accuracy handover (fabric+tariff fixes, worksheet path) 2026-06-06 19:13:21 +00:00
HANDOVER_API_FETCH_AND_REPORT.md docs(modelling): handover — EPC API fetch + property inspection report 2026-06-04 10:46:31 +00:00
HANDOVER_API_PROFILING.md docs: session-9 close-out + session-10 handover (summary-report-based audit) 2026-06-09 14:54:08 +00:00
HANDOVER_ARA_NEXT.md docs: correct SAP calculator path in CONTEXT (domain/sap → domain/sap10_calculator) 2026-06-04 15:40:26 +00:00
HANDOVER_EPC_PREDICTION.md docs(epc-prediction): handover for the accuracy backlog + geo work 2026-06-15 15:12:00 +00:00
HANDOVER_MODELLING.md docs(modelling): next-phase handover — depth + scale e2e + grilling prompt 2026-06-03 23:09:08 +00:00
HANDOVER_NEXT_PHASE_PROMPT.md docs(modelling): next-phase handover — depth + scale e2e + grilling prompt 2026-06-03 23:09:08 +00:00
HANDOVER_SUMMARY_AUDIT.md docs: session-9 close-out + session-10 handover (summary-report-based audit) 2026-06-09 14:54:08 +00:00
MIGRATION_NOTE_predicted_epc_source.md feat(epc-prediction): slice-5c predicted-EPC persistence slot 2026-06-16 03:50:19 +00:00
PR_NOTE_system_built_basement_1177.md docs: PR note for #1177 — system_build property vs field merge collision 2026-06-04 19:51:29 +00:00