Model/domain/modelling/optimisation
Khalim Conn-Kowlessar b37ee071b7 Fabric-first skips the phase-2 re-score when it cannot change the plan 🟪
Review findings on PR #1526, behaviour-preserving:

- No fabric groups, or phase 1 committed nothing → delegate to the plain
  optimise_package: the phase-2 prefix would be empty and its re-scoring
  would reproduce the role-1 signals the groups already carry, one full
  SAP-calculator run per Option for zero effect (the common case on
  already-insulated stock).
- Phase 1 consumed every group → return the fabric package instead of a
  phase-2 pass that can only select the empty package.
- _rescored_groups takes start_sap from the caller: the post-fabric
  baseline score is the phase-1 package score already in hand, not a
  fresh calculator run.
- fabric_types → phase_one_types: the set holds everything phase 1
  committed, injected dependencies included — that inclusion is what the
  outstanding-dependencies filter relies on, so the name must not invite
  narrowing it to FABRIC_MEASURE_TYPES.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 10:29:45 +00:00
..
__init__.py refactor(modelling): group domain/modelling into generators/scoring/optimisation 2026-06-03 13:48:36 +00:00
measure_dependency.py refactor(modelling): type measure_type fields as MeasureType 2026-06-08 20:13:31 +00:00
optimiser.py Fabric-first skips the phase-2 re-score when it cannot change the plan 🟪 2026-07-10 10:29:45 +00:00