Move the next chunk's pick into chunk_pick, so git_repo only runs git and todo_table only parses the plan

This commit is contained in:
2026-10-18 10:33:36 +02:00
parent ca5edc2ae3
commit 6cdace6ae3
20 changed files with 332 additions and 277 deletions
+4 -3
View File
@@ -1,9 +1,10 @@
"""Which ladder rung a chunk's worker and judge run on: docs/decisions.md → `routing:`."""
import dataclasses
from todo_table import chunk_item, Item, items, LastCut
from chunk_pick import chunk_item, LastCut
from model_routing.ladder import climbed, highest, LADDER, position, project_rung, review_floor, Rung, stepped_up, worker_rung
from failure import Failure
from todo_table import Item, items
from model_routing.route import Route
UNFINISHED_PER_STEP = 2
@@ -14,11 +15,11 @@ JUDGE_REPLAYED = ("claude-opus-5-5",)
def routed_item(todo: str, cut: LastCut) -> Item | Failure | None:
"""The item todo_table.chunk_item picks from todo.md, weighed against the last cut; None when there is none, or it lacks L, E or I."""
"""The item chunk_pick.chunk_item picks from todo.md, weighed against the last cut; None when there is none, or it lacks L, E or I."""
found = items(todo)
if isinstance(found, Failure):
return found
_, takes = chunk_item(found or [], cut)
takes = chunk_item(found or [], cut).item
return takes if takes and takes.likelihood and takes.escape_and_impact else None