Model/docs
Khalim Conn-Kowlessar 72f3e3a72d Add default-plan export selection + plan_name column (ADR-0065)
A second export selection alongside the per-Scenario one, chosen by
`plan_selection` on the export request:

- "scenario" (default, unchanged): one sheet per Scenario, freshest Plan per
  (property, scenario); scenario_ids required.
- "default" (new): a single "Default Plans" sheet of each home's is_default
  Plan (one-per-property across all Scenarios, ADR-0012/0017) — the portfolio's
  current state, one row per home; scenario_ids ignored.

Repository gains `default_rows_for(portfolio_id, property_ids)`: same read-model
and Effective-EPC join as `rows_for`, with the plan-selection WHERE swapped from
`scenario_id = :scenario_id` to `is_default = TRUE`. Orchestrator branches on
plan_selection; the router validates it and only requires scenario_ids for the
scenario selection. A recipe without plan_selection defaults to "scenario", so
the change is backward-compatible.

Both selections now surface the chosen Plan's `name` as a `plan_name` column.

Tests: repository default_rows_for (scenario-independent selection, plan_name,
non-default excluded); orchestrator default path (one "Default Plans" sheet;
empty selection is a recorded failure). 62 passed, pyright --strict clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 09:21:38 +00:00
..
adr Add default-plan export selection + plan_name column (ADR-0065) 2026-07-22 09:21:38 +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 Document the nullable lodged_* migration for the FE/Drizzle owner 2026-06-30 22:19:54 +00:00
baseline-downgrade-followups.md docs: record predicted-property display fixes (item 4) 🟪 2026-06-26 10:54:53 +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_EPC_PREDICTION_WIRING.md feat(epc-prediction): thread prediction injection points through the composition root 2026-06-16 13:53:54 +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_REAL_LIFE_CERT_ACCURACY.md docs: handoff for expanding the real-life cert SAP-accuracy corpus 2026-06-15 15:28:40 +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