Call a scoring run only for an item whose tagline opens with the comprehension floor phrase
CI / tests (pull_request) Successful in 2m56s

This commit is contained in:
2026-11-12 21:12:56 +01:00
parent d97846c60e
commit 7b10fd6e58
7 changed files with 29 additions and 23 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ import pathlib
from release_plan.release_standing import Cut, default_plan, LastCut, next_release, Unknown
from failure import Failure
from git_cli.git_repo import file_at, top
from larv_review.scoring import FLOOR_ITEM
from larv_review.scoring import is_floor_item
from release_plan.todo_table import Item, items, NoItemsTable, renames
from release_plan.ranking import OPTED_OUT
from release_plan.release import Release, version
@@ -25,7 +25,7 @@ def scoring_run_due(before: list[Item], after: list[Item], ships: list[int], lan
if unknown := sorted(set(ships) - set(plan)):
return Failure(f"neither plan holds item {', '.join(map(str, unknown))}")
shipped = [plan[id_] for id_ in ships]
reasons = [f"ships item {item.id}, which names the comprehension floor" for item in shipped if FLOOR_ITEM in item.tagline.lower()]
reasons = [f"ships item {item.id}, which names the comprehension floor" for item in shipped if is_floor_item(item)]
if unmeasured:
reasons.append(f"follows {unmeasured}")
for release in emptied(before, after, shipped, renamed):