Run the judge of an Opus 5.5 project on Opus 5.5 at xhigh in every chunk
CI / tests (pull_request) Successful in 2m35s

This commit is contained in:
2026-11-12 02:54:03 +01:00
parent 75c9c2718a
commit c61997f7b7
9 changed files with 46 additions and 51 deletions
+7 -13
View File
@@ -5,12 +5,12 @@ The worker, and the session /talk opens, run on a Route (model_routing/route.py)
- Start. routed_item finds the plan item that routes a fresh chunk, if there is one with L, E and I scored; first_route picks the worker's rung from its L, or the project's rung without an item.
- Rerun. kept decides whether a rerun resumes the route its archive last names.
- Step-up. next_route raises the route after an unfinished verdict (unfinished_route), or an interrupt or a quoted answer that carries an escalation (escalated_route); escalation_cap bounds an escalation, and loop_claude/escalation_mark.py states the escalation mark's rule. step_up names the change where it changes the worker line, which the archive records.
- Judge. judge_rung picks the rung of the judge of a JUDGE_REPLAYED model.
- Judge. judge_rung picks the rung of the judge of a JUDGE_REPLAYED model: its model's highest.
"""
import dataclasses
from release_plan.release_standing import chunk_item, LastCut, Next
from model_routing.ladder import climbed, highest, LADDER, position, project_rung, review_floor, Rung, stepped_up, worker_rung
from model_routing.ladder import climbed, highest, LADDER, position, project_rung, Rung, stepped_up, worker_rung
from loop_claude import escalation_mark
from failure import Failure
from loop_claude.verdicts import Interrupt, QuotedAnswer, Unfinished
@@ -20,7 +20,7 @@ from model_routing.route import Route
UNFINISHED_PER_STEP = 2
# How many rungs above item_rung an escalation trigger takes the worker or a task without the human's yes, as escalation_cap counts them.
ESCALATION_CAP = 2
# The models whose cheapest rung, in a `judge-replay` run, returned every interrupt the reference judge reproduced: docs/decisions.md → `routing: on a model judge-replay covered`.
# The models whose cheapest rung, in a `judge-replay` run, returned every interrupt the reference judge reproduced, and whose judge runs on their highest rung: docs/decisions.md → `routing: on a model judge-replay covered`.
JUDGE_REPLAYED = ("claude-opus-5-5",)
@@ -137,14 +137,8 @@ def one_rung_up(route: Route, rung: Rung, escalated_at: int) -> Route:
return dataclasses.replace(route, rung=stepped_up(rung), unfinished=0, escalated_at=escalated_at)
def judge_rung(judge_model: str, route: Route) -> Rung:
"""The lowest of the judge model's own rungs at or above the rung a review gets from the route's reviewed_on E + I, counted from the model's cheapest rung. Where that review rung is above all the model's rungs, the model's highest. The worker's rung doesn't change it.
The judge keeps to its model's rungs, since every Fable 5.2 rung judge-replay tried missed an interrupt: docs/decisions.md → `routing: on a model judge-replay covered`. A model off the ladder, or not in JUDGE_REPLAYED, gets no effort flag, so claude runs it at the effort its settings give.
"""
cheapest = project_rung(judge_model)
if cheapest is None or judge_model not in JUDGE_REPLAYED:
def judge_rung(judge_model: str) -> Rung:
"""The highest of the judge model's own rungs, whatever the chunk's items score: docs/decisions.md → `routing: on a model judge-replay covered`. A model off the ladder, or not in JUDGE_REPLAYED, gets no effort flag, so claude runs it at the effort its settings give."""
if project_rung(judge_model) is None or judge_model not in JUDGE_REPLAYED:
return Rung(judge_model)
floor = position(review_floor(cheapest, route.reviewed_on()))
own = [rung for rung in LADDER if rung.model == judge_model]
return next((rung for rung in own if position(rung) >= floor), own[-1])
return [rung for rung in LADDER if rung.model == judge_model][-1]