Answer prose round 1: 0 🔴, 6 🟡; correct what the help, changelog, decision and item 136 claim, and tighten the routing comments

This commit is contained in:
2026-10-14 23:32:04 +02:00
parent 3820657506
commit f52228d9ad
13 changed files with 29 additions and 29 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ JUDGE_RULES = (
@dataclasses.dataclass(frozen=True)
class Reply:
answer: str = dataclasses.field(metadata={"description": "With interrupt false, the passage of README.md or the records that answers the agent's question, quoted verbatim, without elisions. Empty otherwise."})
# Routes the next cycle's worker; loop-claude never steps it down, so the item the chunk was routed on may count too.
# Routes the next cycle's worker. Counting the item the chunk was routed on is harmless: loop-claude never steps the worker down.
bundled: int = dataclasses.field(metadata={"description": "The highest R + C the agent states for a todo.md item it took into this chunk; 0 when it states none."})
evidence: str = dataclasses.field(metadata={"description": "A verbatim quote of the one transcript passage the verdict rests on, without elisions: what triggers the interrupt; for a quoted answer, the agent's question; else what shows the chunk finished or the work remaining."})
finished: bool = dataclasses.field(metadata={"description": "Whether the chunk is finished."})
+1 -1
View File
@@ -20,7 +20,7 @@ def fresh(task: str, premises: str, route: Route) -> str:
def routed_by(route: Route) -> str:
return f"loop-claude runs you on {route.rung}, the rung item {route.item}'s R + C of {route.risk_and_complexity} picks. Name each todo.md item this chunk takes, with its R + C, whether or not it is item {route.item}."
return f"loop-claude runs you on {route.rung}, routed by item {route.item}'s R + C of {route.risk_and_complexity}. Name each todo.md item this chunk takes, with its R + C, whether or not it is item {route.item}."
def resumed(unfinished_evidence: str) -> str:
+13 -12
View File
@@ -41,15 +41,16 @@ run, is asked for one. LOOP_CLAUDE_JUDGE_MODEL overrides it for the judge, LOOP_
for the worker and the interrupt; with both set, nothing is asked.
Where that model is on the routing ladder (bin/model_routing/ladder.py), the worker and the
interrupt run on a rung of it instead: a model at an effort. As a chunk starts, the R + C of
todo.md's top item in the next release, skipping a question, picks the rung from the model's
cheapest one, and never below it; without such an item, or with a C missing, the chunk runs on the
model's cheapest rung. The worker's first prompt names the rung and the item, and asks it to name
each item the chunk takes, with its R + C. The judge reports the highest R + C it sees the worker
state, and the next cycle steps up to the rung that picks, never down. Every second unfinished
verdict on a chunk steps it up one rung. Each verdict, stop and step up archived names the worker's
rung, with the item and R + C that routed the chunk; a rerun resumes an open chunk on the latest
rung named there, and counts its unfinished verdicts afresh. A rung no longer on the ladder, or
interrupt run on one of the ladder's rungs: a model at an effort. As a chunk starts, the R + C of
todo.md's top item in the next release, skipping an item marked question, picks the rung. It
counts from the model's cheapest rung and never goes below it; without such an item, or with a C
missing, the chunk runs on the model's cheapest rung. The worker's first prompt names the rung and
the item, and asks the worker to name each item the chunk takes, with its R + C. The judge reports
the highest R + C the worker states, and the next cycle steps up to the rung that R + C picks,
never down. Every second unfinished verdict on a chunk steps it up one rung. Each finished or
unfinished verdict, stop and step-up in the archive names the worker's rung, with the item and
R + C that routed the chunk; a rerun resumes an open chunk on the latest rung named there, and
counts its unfinished verdicts afresh. A rung no longer on the ladder, or
below the model's cheapest, is dropped, and the chunk is routed afresh from todo.md. A todo.md or
an archive that cannot be read or parsed is said on stderr, and the chunk is routed without it.
@@ -73,9 +74,9 @@ Exit 1, saying why, when:
- the worker or the judge fails three times running, retried a minute apart within the cycle. A
worker fails when claude cannot start, exits non-zero, is killed, or ends without a result event;
a judge when claude cannot start or exits non-zero, or its reply misses or mistypes a field,
interrupts or quotes an answer without a question, gives a bundled R + C outside 0 to 20, or
quotes a passage the transcript does not hold; it holds an elided passage when each fragment
appears in order.
interrupts or quotes an answer without a question, gives an unfinished verdict an R + C outside
0 to 20, or quotes a passage the transcript does not hold; it holds an elided passage when each
fragment appears in order.
A usage limit is not a failure, and restarts the count of three: the worker or the judge is
retried 2 minutes after the limit resets, or every 10 minutes when the reset time is unknown or
more than 2 minutes past. The judge's reply gives its reset time only as text, so the judge is
+1 -1
View File
@@ -14,7 +14,7 @@ ROUTED = re.compile(r"(?P<model>\S+) at (?P<effort>\S+) effort(?:, routed by ite
class Route:
"""A chunk's worker rung and the plan item whose R + C picked it, 0 for none.
unfinished is the loop's count of unfinished verdicts since the rung last stepped up, kept here so a reload hands it over with the rung.
unfinished counts the unfinished verdicts towards the next one-rung step; a reload hands it over with the rung.
"""
rung: Rung
item: int = 0
+1 -1
View File
@@ -390,7 +390,7 @@ class Cycles(unittest.TestCase):
("claude-opus-5-5", "high"),
])
self.assertEqual({(argument(call, "--model"), argument(call, "--effort")) for call in run.calls if call["role"] == "judge"}, {("judge-model", None)})
self.assertIn("loop-claude runs you on claude-opus-5-5 at high effort, the rung item 4's R + C of 11 picks. Name each todo.md item this chunk takes, with its R + C, whether or not it is item 4.", argument(workers[0], "-p"))
self.assertIn("loop-claude runs you on claude-opus-5-5 at high effort, routed by item 4's R + C of 11. Name each todo.md item this chunk takes, with its R + C, whether or not it is item 4.", argument(workers[0], "-p"))
outcomes = sorted(verdict.removeprefix(f"Task: {TASK}\n\n") for verdict in checkout.archived().values())
self.assertIn("<UTC> Verdict: unfinished\n\nEvidence:\n> three\n\nWorker: claude-opus-5-5 at xhigh effort, routed by item 4's R + C of 11\n\n<UTC> Stepped up\n\nWorker: claude-fable-5-1 at max effort, routed by item 4's R + C of 11\n", outcomes)
self.assertIn("<UTC> Verdict: finished\n\nEvidence:\n> four\n\nWorker: claude-fable-5-1 at max effort, routed by item 4's R + C of 11\n", outcomes)
+2 -2
View File
@@ -523,7 +523,7 @@ class Steps(unittest.TestCase):
class WorkerArgs(unittest.TestCase):
def test_names_the_route_in_a_fresh_prompt_only_where_an_item_routed_it(self):
routed = prompts.fresh("Do it.", "## Goals", routing.Route(Rung("m", "high"), 3, 11))
self.assertIn("Continue any open draft PR or worktree for the chunk before creating a new one.\n\nloop-claude runs you on m at high effort, the rung item 3's R + C of 11 picks. Name each todo.md item this chunk takes, with its R + C, whether or not it is item 3.\n\nThe chunk's", routed)
self.assertIn("Continue any open draft PR or worktree for the chunk before creating a new one.\n\nloop-claude runs you on m at high effort, routed by item 3's R + C of 11. Name each todo.md item this chunk takes, with its R + C, whether or not it is item 3.\n\nThe chunk's", routed)
unrouted = prompts.fresh("Do it.", "## Goals", routing.Route(Rung("m")))
self.assertIn("before creating a new one.\n\nThe chunk's", unrouted)
self.assertNotIn("loop-claude runs you on", unrouted)
@@ -736,7 +736,7 @@ class JudgeFailures(unittest.TestCase):
("verdict_from", 'f"the judge\'s reply has no {name}', field),
("verdict_from", "'the judge interrupted without a question'", unasked),
("verdict_from", "'the judge quoted an answer without a question'", unasked),
("verdict_from", 'f"the judge\'s bundled R + C', "gives a bundled R + C outside 0 to 20"),
("verdict_from", 'f"the judge\'s bundled R + C', "gives an unfinished verdict an R + C outside 0 to 20"),
("run_judge", "f'could not start claude:", started),
("run_judge", "proc.stderr.strip() or f'the judge exited", started),
("run_judge", 'f"{verdict.reason}; it replied:', field),