Answer principles round 1: 0 🔴, 2 🟡; state the R cap in chunk-preflight's help and output, correct the decision's I 4 claim, and pin the cap at 5 in tests

This commit is contained in:
2026-10-22 20:55:02 +02:00
parent 64d399f7f5
commit 8c3298f673
6 changed files with 22 additions and 12 deletions
+2 -2
View File
@@ -204,9 +204,9 @@ def renames(todo: str) -> set[tuple[int, int, int]] | Failure:
def bundle_candidates(found: list[Item], first: Item) -> list[Item]:
"""The items of first's release, in the table's order, that a chunk taking first may take too: those that do not wait once the chunk's own items count as done. An item above BUNDLE_MAX_R ships alone."""
if first.scores.get("R", 0) > BUNDLE_MAX_R:
return []
chunk = {item.id for item in found if item.release == first.release and item.scores.get("R", 0) <= BUNDLE_MAX_R}
if first.id not in chunk:
return []
# Dropping an item that waits may make another wait on it, so drop until none waits.
while waits := waiting(found, chunk) & chunk:
chunk -= waits