Model/tests/orchestration
Khalim Conn-Kowlessar 34d4748a3a feat(modelling): wire the Optimiser into the orchestrator (#1160)
Slice 3b — closes #1160. ModellingOrchestrator._plan_for now runs the
full ADR-0016 flow instead of a single cavity measure:

  generate wall + roof + floor Recommendations → score each Option
  independently (role 1) into grouped ScoredOptions → optimise_package
  (grouped knapsack within budget + whole-package re-score + greedy
  repair toward the Scenario's SAP target) → attribute the selected set
  via the best-practice marginal cascade (role 3) → persist the Plan
  with its Plan Measures.

The repair target comes from the goal: INCREASING_EPC → the goal_value
band floor via Epc.sap_lower_bound(); other goals carry no SAP target
yet (later slice). Best-practice order walls → roof → floor.

Integration test: an uninsulated cavity wall + suspended floor (000490)
driven directly through the Modelling stage off a repo-seeded EPC
(the calculator fixture has no lodged recorded-performance fields, so
Baseline can't run it) persists a Plan with two attributed, priced Plan
Measures. The existing first-run test keeps full-pipeline coverage and
now exercises real modelling (its sample EPC's uninsulated solid floor
yields a floor measure). Replaces the single-measure cavity integration
test (subsumed). 138 pass; pyright strict clean.

Multi-phase remains descoped (ADR-0005); single-phase optimiser.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 13:07:14 +00:00
..
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
fakes.py feat(baseline): CalculatorRebaseliner — calculator goes load-bearing (ADR-0013 amend) 2026-06-02 10:04:24 +00:00
test_ara_first_run_pipeline.py feat(modelling): ModellingOrchestrator persists a Plan end-to-end (#1157) 2026-06-03 12:08:32 +00:00
test_ara_first_run_pipeline_integration.py feat(modelling): wire the Optimiser into the orchestrator (#1160) 2026-06-03 13:07:14 +00:00
test_ingestion_orchestrator.py refactor(orchestration): wire stages onto the UnitOfWork; per-stage commit (#1138) 2026-06-01 16:28:48 +00:00
test_landlord_description_overrides_orchestrator.py moved classifier data transformation to an easy one 2026-06-01 14:53:34 +00:00
test_postcode_splitter_orchestrator.py updated rdsap option; seperated s3 location in infrastrucutre; added open ai api 2026-05-22 14:00:33 +00:00
test_property_baseline_orchestrator.py feat(baseline): wire BillDerivation into the orchestrator and persist the Bill (ADR-0014) 2026-06-02 18:51:18 +00:00
test_task_orchestrator.py tests framework completed 2026-05-20 14:00:19 +00:00