From 4d7434a954a95345e04c37e30f9ae2241595cdc1 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Thu, 9 Jul 2026 11:45:56 +0000 Subject: [PATCH] =?UTF-8?q?Hoist=20consumed-group=20lookup=20out=20of=20th?= =?UTF-8?q?e=20phase-2=20comprehension=20=F0=9F=9F=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- domain/modelling/optimisation/optimiser.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/domain/modelling/optimisation/optimiser.py b/domain/modelling/optimisation/optimiser.py index 4a5edd28e..73f5e9a1a 100644 --- a/domain/modelling/optimisation/optimiser.py +++ b/domain/modelling/optimisation/optimiser.py @@ -260,10 +260,9 @@ def optimise_package_fabric_first( # with the phase-1 overlays, so candidates are valued against the # fabric-applied dwelling and the resulting package score stays the # truthful whole-package figure against the original baseline. + consumed: set[int] = _used_group_indices(groups, fabric_package.selected) remaining_groups: list[list[ScoredOption]] = [ - group - for index, group in enumerate(groups) - if index not in _used_group_indices(groups, fabric_package.selected) + group for index, group in enumerate(groups) if index not in consumed ] post_fabric_scorer = _PrefixedScorer( scorer, [scored.option.overlay for scored in fabric_package.selected]