Rank each todo.md blocker just above the first item it blocks, allow no other order in todo.md, and route loop-claude on the first item that waits on nothing
This commit is contained in:
@@ -14,13 +14,21 @@ JUDGE_REPLAYED = ("claude-opus-5-5",)
|
||||
|
||||
|
||||
def routed_item(todo: str) -> Item | Failure | None:
|
||||
"""The next release's first row that waits on no question, in the table's order, which rank_todo.py keeps ranked; None when there is none, or it has no C."""
|
||||
"""The next release's first row that waits on nothing, in the table's order, which rank_todo.py keeps with each blocker above the items it blocks; None when there is none, or it has no C.
|
||||
|
||||
An item waits on a question it is marked with, or on a blocker that waits.
|
||||
"""
|
||||
found = items(todo)
|
||||
if isinstance(found, Failure) or not found:
|
||||
return found if isinstance(found, Failure) else None
|
||||
next_release = min(item.release for item in found)
|
||||
takes = next((item for item in found if item.release == next_release and item.exempt != "question"), None)
|
||||
return takes if takes and takes.risk_and_complexity else None
|
||||
waiting: set[int] = set()
|
||||
for item in found:
|
||||
if item.exempt == "question" or waiting.intersection(item.blocked_by):
|
||||
waiting.add(item.id)
|
||||
elif item.release == next_release:
|
||||
return item if item.risk_and_complexity else None
|
||||
return None
|
||||
|
||||
|
||||
def first_route(anchor: Rung, item: Item | None) -> Route:
|
||||
@@ -83,7 +91,7 @@ def taken_in(anchor: Rung, route: Route, bundled: int) -> Rung:
|
||||
def judge_rung(judge_model: str, route: Route) -> Rung:
|
||||
"""The rung the route's item picks from the judge model's cheapest rung, never below that rung, whatever rung the worker stepped to.
|
||||
|
||||
An item the worker takes in moves the worker's rung but not the judge's, until todo.md item 136 routes the chunk on the item the worker takes.
|
||||
An item the worker takes in besides moves the worker's rung but not the judge's.
|
||||
|
||||
A model off the ladder, or not in JUDGE_REPLAYED, gets no effort flag, so claude runs it at the effort its settings give.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user