Bind a project's rung to its ladder in ProjectRung, and step an L 3 worker one rung up and an L 4 worker two up
CI / tests (pull_request) Failing after 3m48s

This commit is contained in:
2026-11-17 08:12:16 +01:00
parent 3543d9e964
commit 64ab847b0a
21 changed files with 392 additions and 335 deletions
+4 -4
View File
@@ -10,11 +10,11 @@ from loop_claude.routing import first_route, kept, routed_item
from loop_claude.loop.chunk_windows import held_beside, item_of
from chunk_preflight.main import ITEM
from plan.todo_table import Item
from model_routing.ladder import Ladder, Rung
from transcript_archive.read import latest_worker
from project_config.main import located
from loop_claude.loop.this_loop import Loop
from plan_store.plans import Plan
from model_routing.ladder import ProjectRung, Rung
from loop_claude.cycle import prompts
from model_routing.route import Route, route_from
from claude_code.session import session_open, transcript_file
@@ -31,15 +31,15 @@ def scored_plan(default: DefaultPlan | Failure, effects: Effects) -> Plan | Fail
return plan
def routed(route: Route | None, ladder: Ladder, project: Rung | None, model: str, archived: typing.Callable[[], Route | None], item: typing.Callable[[], Item | None]) -> Route:
"""The route the cycle runs on. project is the project's rung on ladder, and model the project's model.
def routed(route: Route | None, project: ProjectRung | None, model: str, archived: typing.Callable[[], Route | None], item: typing.Callable[[], Item | None]) -> Route:
"""The route the cycle runs on. project is the project's rung, and model the project's model.
Where project is None, the model is off the ladder, and the worker runs on it. Otherwise the chunk keeps route, or on a rerun the route its archive last names, as routing.kept allows. Else the plan item routes the chunk afresh.
"""
if project is None:
return Route(Rung(model))
route = route or archived()
return route if route and kept(route, ladder, project) else first_route(ladder, project, item())
return route if route and kept(route, project) else first_route(project, item())
def archived_route(archive_folder: pathlib.Path, loop: Loop) -> Route | None: