Answer architecture round 1: 0 🔴, 6 🟡; show the judge the mark, carry the entries read on the verdict, name the checked texts

This commit is contained in:
2026-10-18 13:50:06 +02:00
parent 1ed305f1e2
commit 2bba66ac0a
10 changed files with 158 additions and 104 deletions
+13 -9
View File
@@ -62,26 +62,30 @@ def escalation_cap(anchor: Rung, route: Route) -> Rung:
def stepped(anchor: Rung, route: Route, bundled: int, escalated_at: int | None) -> Route:
"""The route after one more unfinished verdict. Its rung never falls below taken_in's. It steps up one rung on every second unfinished verdict, or on an escalation the judge found while the rung is below escalation_cap; where both fall on one verdict, it steps once, and the escalation's mark moves.
"""The route after one more unfinished verdict. Its rung never falls below taken_in's. It steps up one rung on every second unfinished verdict, or on an escalation the judge found while the rung is below escalation_cap; where both fall on one verdict, it steps once.
bundled is the verdict's field, and escalated_at the count of transcript entries the judge read where the verdict carries an escalation, None where it carries none; not the verdict, since loop_claude.cycle.judge imports this module through prompts.
The mark, Route.escalated_at, moves only on a step whose verdict carries an escalation: to escalated_at, how many transcript entries the judge read. A step on the count of unfinished verdicts alone keeps it.
bundled and escalated_at are the verdict's bundled and judge.escalation_mark, None where the verdict carries no escalation; not the verdict, since loop_claude.cycle.judge imports this module through prompts.
"""
rung = taken_in(anchor, route, bundled)
unfinished = route.unfinished + 1
if unfinished >= UNFINISHED_PER_STEP or (escalated_at is not None and below_cap(anchor, route, rung)):
return stepped_from(route, rung, route.escalated_at if escalated_at is None else escalated_at)
return one_rung_up(route, rung, escalated_at)
return dataclasses.replace(route, rung=rung, unfinished=unfinished)
def stepped_by_ruling(anchor: Rung, route: Route, bundled: int, escalated_at: int) -> Route:
"""The route after the judge's interrupt or quoted answer carried an escalation, escalated_at the count of transcript entries the judge read: taken_in's rung, one rung up while that is below escalation_cap. Neither is an unfinished verdict, so the count of those restarts only with a step."""
def stepped_by_ruling(anchor: Rung, route: Route, bundled: int, escalated_at: int | None) -> Route:
"""The route after the judge's interrupt or quoted answer, its arguments as stepped's: unchanged without an escalation; with one, taken_in's rung, one rung up while that is below escalation_cap. Neither is an unfinished verdict, so the count of those restarts only with a step."""
if escalated_at is None:
return route
rung = taken_in(anchor, route, bundled)
return stepped_from(route, rung, escalated_at) if below_cap(anchor, route, rung) else dataclasses.replace(route, rung=rung)
return one_rung_up(route, rung, escalated_at) if below_cap(anchor, route, rung) else dataclasses.replace(route, rung=rung)
def stepped_from(route: Route, rung: Rung, escalated_at: int) -> Route:
"""The route one rung above rung, with the count of unfinished verdicts restarted and the escalation's mark at escalated_at."""
return dataclasses.replace(route, rung=stepped_up(rung), unfinished=0, escalated_at=escalated_at)
def one_rung_up(route: Route, rung: Rung, escalated_at: int | None) -> Route:
"""The route one rung above rung, with the count of unfinished verdicts restarted and the mark moved as stepped says."""
return dataclasses.replace(route, rung=stepped_up(rung), unfinished=0, escalated_at=route.escalated_at if escalated_at is None else escalated_at)
def below_cap(anchor: Rung, route: Route, rung: Rung) -> bool: