Answer stability round 1: 0 🔴, 1 🟡 (0 misread); name the search's lowest rung a candidate

This commit is contained in:
2026-11-12 01:55:46 +01:00
parent 4ab5b629ea
commit 79f6334c7f
9 changed files with 33 additions and 28 deletions
+13 -10
View File
@@ -11,15 +11,18 @@ with the task, premises and records each project holds now.
It first replays every verdict on the reference judge: the model at xhigh effort, the rung the
judge ran on before loop-claude routed it. A verdict the reference judge returns another kind on
may rest on records or judge rules that have changed since; either way no rung is held to it. It
then replays the rest on each rung above the model's cheapest that a chunk's E + I climbs a
review to, the reference judge's rung aside. Then it replays them on each candidate rung, highest
first: from the model's cheapest rung down to the lowest rung a worker routes to. It stops at the
first candidate that misses one. It prints each verdict the reference judge did not reproduce,
each verdict a rung missed, and the lowest candidate that, like each candidate above it, missed
none. A climbed rung that misses no interrupt is the evidence to let judge_rung in
bin/loop_claude/routing.py climb the judge onto it, which today keeps the judge to its model's rungs. A rung it names is the evidence to add the model to
JUDGE_REPLAYED in bin/loop_claude/routing.py, which routes that model's judge, and to record the
run in docs/decisions.md → `routing: on a model judge-replay covered`.
then replays the rest on each rung above the model's cheapest that a chunk's E + I raises a
review to, except the reference judge's rung. Then it replays them on each candidate rung,
highest first: from the model's cheapest rung down to the lowest rung a worker routes to. It stops
at the first candidate that misses one. It prints each verdict the reference judge did not
reproduce, each verdict a rung missed, and the lowest candidate that, like each candidate above
it, missed none.
Record each run in docs/decisions.md → `routing: on a model judge-replay covered`. Where the
model's cheapest rung misses no interrupt, the run is the evidence to add the model to
JUDGE_REPLAYED in bin/loop_claude/routing.py, which routes that model's judge. judge_rung there
keeps the judge to its own model's rungs; a rung above them that misses no interrupt is the
evidence to let the judge climb onto it.
Like the loop, it tries a judge three times running before it counts the reply as failed. A
verdict whose project or transcript cannot be read replays as failed too. Exit 1, saying why, on
@@ -77,7 +80,7 @@ def model_argument(argv: list[str]) -> Rung | None:
def climbs(project: Rung, reference: Rung) -> list[Rung]:
"""The rungs above the project's rung that an E + I climbs a review to, lowest first, the reference's aside: those the judge would climb to as a review does."""
"""The rungs above the project's rung that an E + I raises a review to, except the reference's, lowest first."""
return sorted({review_floor(project, score) for score in REVIEW_STEPS} - {project, reference}, key=position)
+1 -1
View File
@@ -83,7 +83,7 @@ def report(model: str, reference: Rung, cases: list[Case], replay: Replay[Case,
lines.append("No rung tried: the reference judge reproduced no verdict to hold one to.")
else:
lowest = replay.lowest or "none, the project's rung misses one"
lines.append(f"Lowest rung that, like each rung above it, returns every verdict the reference judge reproduces: {lowest}")
lines.append(f"Lowest candidate that, like each candidate above it, returns every verdict the reference judge reproduces: {lowest}")
return "\n".join(lines)
+2 -2
View File
@@ -77,11 +77,11 @@ class Report(unittest.TestCase):
"claude-sonnet-5-5 at high effort missed 0.",
"claude-haiku-5-5 at xhigh effort missed 1:",
" /code/p 2026-10-14T10:00:01Z: archived Verdict: interrupt, replayed Verdict: finished",
"Lowest rung that, like each rung above it, returns every verdict the reference judge reproduces: claude-sonnet-5-5 at high effort",
"Lowest candidate that, like each candidate above it, returns every verdict the reference judge reproduces: claude-sonnet-5-5 at high effort",
])
missed_all = report("claude-opus-5-5", REFERENCE, cases, Replay([FINISHED, INTERRUPTED], [Tried(MIDDLE, [Miss(cases[1], INTERRUPTED, FINISHED)])], None)).splitlines()
self.assertEqual(missed_all[1], "The reference judge, claude-opus-5-5 at xhigh effort, reproduced 2.")
self.assertEqual(missed_all[-1], "Lowest rung that, like each rung above it, returns every verdict the reference judge reproduces: none, the project's rung misses one")
self.assertEqual(missed_all[-1], "Lowest candidate that, like each candidate above it, returns every verdict the reference judge reproduces: none, the project's rung misses one")
self.assertEqual(report("claude-opus-5-5", REFERENCE, cases, Replay([UNFINISHED, FINISHED], [], None)).splitlines()[-1], "No rung tried: the reference judge reproduced no verdict to hold one to.")
def test_names_each_miss_of_each_rung_the_judge_climbs_to_before_the_search_down(self):
+2 -2
View File
@@ -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 `judge-replay` found missing no 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: docs/decisions.md → `routing: on a model judge-replay covered`.
JUDGE_REPLAYED = ("claude-opus-5-5",)
@@ -138,7 +138,7 @@ def one_rung_up(route: Route, rung: Rung, escalated_at: int) -> Route:
def judge_rung(judge_model: str, route: Route) -> Rung:
"""The lowest of the judge model's own rungs at or above the rung the route's reviewed_on E + I picks for a review, else the model's highest; counted from the model's cheapest rung, whatever rung the worker stepped to.
"""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.
"""
+7 -5
View File
@@ -35,7 +35,7 @@ class Tried(typing.Generic[Case, Aim, Answer]):
@dataclasses.dataclass(frozen=True)
class Replay(typing.Generic[Case, Aim, Answer]):
"""on_reference holds the reference's reply on each case; tried, each candidate tried, highest first; lowest, the lowest rung that, like each candidate above it, missed nothing, or None; climbed, each climb tried, in the order given."""
"""on_reference holds the reference's reply on each case; tried, each candidate tried, highest first; lowest, the lowest candidate that, like each candidate above it, didn't miss anything, or None; climbed, each climb tried, in the order given."""
on_reference: list[Answer]
tried: list[Tried[Case, Aim, Answer]]
lowest: Rung | None
@@ -51,15 +51,17 @@ def replayed(
what: str,
climbs: typing.Sequence[Rung] = (),
) -> Replay[Case, Aim, Answer] | Limited:
"""Replays the cases on the reference rung, then each climb, then each candidate, highest first, on the cases where the reference reproduced anything, until a candidate misses an item it reproduced.
"""Replays the cases on the reference rung, then on each climb and each candidate, on the cases where the reference reproduced anything.
Going down, every rung at or above the one named was tried and missed nothing, so the result needs no assumption that a higher rung does at least as well; and a miss high up spares the cheaper rungs their replays. A climb is a rung above the candidates that a route can still pick, so each is tried whatever another misses.
A climb is a rung above the candidates, such as one a chunk's E + I raises a review to. The rungs a route picks there don't follow from one another, so each climb is tried whatever another misses.
The candidates are tried highest first, until one misses an item the reference reproduced. Going down, every candidate at or above the one named was tried and didn't miss anything, so the result needs no assumption that a higher rung does at least as well; and a miss high up spares the cheaper rungs their replays.
"""
on_reference = replayed_on(cases, reference, replay_one, what)
if isinstance(on_reference, Limited):
return on_reference
held = [(case, aim) for case, reply in zip(cases, on_reference) if (aim := reproduced(case, reply))]
# With nothing to hold a rung to, every rung would miss nothing.
# With nothing to hold a rung to, no rung would miss anything.
if not held:
return Replay(on_reference, [], None)
climbed: list[Tried[Case, Aim, Answer]] = []
@@ -88,7 +90,7 @@ def tried_on(
reproduced: typing.Callable[[Case, Answer], list[Aim]],
what: str,
) -> Tried[Case, Aim, Answer] | Limited:
"""rung's replies on the held cases, with each item the reference reproduced that a reply missed."""
"""rung and each item, of those the reference reproduced in the held cases, that its replies missed."""
replies = replayed_on([case for case, _ in held], rung, replay_one, what)
if isinstance(replies, Limited):
return replies