Answer principles round 2: 0 🔴, 0 🟡; decide ships-alone in one predicate both modules call

This commit is contained in:
2026-10-22 20:56:45 +02:00
parent 6150c5289e
commit fbdb6c9f08
2 changed files with 10 additions and 5 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
"""The lines the preflight prints, stated from what it gathered."""
from todo_table import BUNDLE_MAX_R, bundle_candidates, Item, version
from todo_table import BUNDLE_MAX_R, bundle_candidates, Item, ships_alone, version
from failure import Failure
from chunk_preflight.gathered import Forge, Gathered, ItemFacts, NamedPath, NoItem, Plan, Ran
from chunk_pick import LastCut, unreleased_entries
@@ -66,7 +66,7 @@ def open_pulls(stdout: str, forge: Forge, branch: str) -> list[str]:
def bundled(plan: Plan) -> list[str]:
first, candidates = plan.first, bundle_candidates(plan.items, plan.first)
if first.scores.get("R", 0) > BUNDLE_MAX_R:
if ships_alone(first):
return [f"- Item {first.id} has R above {BUNDLE_MAX_R}, so it ships alone."]
if not candidates:
return [f"- No other item of release {version(first.release)} may join item {first.id}'s chunk."]