Model/tests
Khalim Conn-Kowlessar 49e86344d2 feat(modelling): whole-package re-score + greedy repair (#1160)
Slice 2 of #1160 — the ADR-0016 truth step on top of the warm-start
knapsack. optimise_package(groups, scorer, baseline_epc, budget,
target_sap) -> OptimisedPackage:

  warm-start optimise() (role-1 signal) → re-score the chosen package on
  the real scorer (role-2 truth) → while the true SAP undershoots
  target_sap and budget remains, greedy-add the untreated-group Option
  with the best *marginal* SAP-per-£ (re-scored, not the role-1 signal),
  re-score, repeat until the target is met, nothing positive-marginal is
  affordable, or the budget is spent.

`Scorer` is a structural Protocol (PackageScorer satisfies it) so the
repair loop is tested with a stub scorer — no calculator, runs on ARM.
The key case: role-1 under-counts roof so the warm-start skips it, the
re-score undershoots, and repair adds roof back to hit the target. 3
repair tests + the 6 core tests; pyright strict clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 12:45:05 +00:00
..
applications refactor(ara): rename FirstRunPipeline → AraFirstRunPipeline (PR #1139 review) 2026-06-01 16:28:48 +00:00
domain feat(modelling): whole-package re-score + greedy repair (#1160) 2026-06-03 12:45:05 +00:00
infrastructure Remove EPC and asset_list changes unrelated to SAL handler 2026-06-01 16:39:09 +00:00
orchestration feat(modelling): ModellingOrchestrator persists a Plan end-to-end (#1157) 2026-06-03 12:08:32 +00:00
repositories feat(modelling): expose scenario/product/plan repos on the UnitOfWork (#1157) 2026-06-03 11:53:34 +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
test_lambda_packaging.py more tests to ensure we don't deploy something that is brokern 2026-06-02 15:03:20 +00:00