Answer architecture round 1: 2 🔴, 13 🟡; test the replay's main and report, share one judge run and the archive format, pin the reference judge, route only replayed models, and say why the judge climbs
This commit is contained in:
@@ -121,8 +121,13 @@ def verdict_from(output: object) -> Verdict | Failure:
|
||||
|
||||
|
||||
def judge(root: str, task: str, premises: str, records: str, rendered_transcript: str, rung: Rung, effects: Effects) -> Verdict | Stop:
|
||||
return retried("judge", lambda: judge_once(root, task, premises, records, rendered_transcript, rung, effects), effects)
|
||||
|
||||
|
||||
def judge_once(root: str, task: str, premises: str, records: str, rendered_transcript: str, rung: Rung, effects: Effects) -> Verdict | Failure | Limited:
|
||||
"""One judge run, as judge retries it; judge-replay replays it."""
|
||||
prompt, shown = judge_prompt(task, premises, records, rendered_transcript)
|
||||
return retried("judge", lambda: run_judge(root, judge_args(rung), prompt, shown, f"{premises}\n\n{records}", effects), effects)
|
||||
return run_judge(root, judge_args(rung), prompt, shown, f"{premises}\n\n{records}", effects)
|
||||
|
||||
|
||||
def judge_args(rung: Rung) -> list[str]:
|
||||
|
||||
@@ -9,6 +9,7 @@ from loop_claude.effects import Effects
|
||||
from failure import Failure
|
||||
from loop_claude.cycle.judge import Finished, Interrupt, judge, QuotedAnswer, Unfinished
|
||||
from loop_claude.cycle.interrupt import interrupt
|
||||
from loop_claude.routing import judge_rung
|
||||
from transcript_archive import outcomes
|
||||
from loop_claude.paths import Paths
|
||||
from loop_claude.cycle import prompts
|
||||
@@ -23,7 +24,7 @@ from loop_claude.stop import Stop
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class Cycle:
|
||||
effects: Effects
|
||||
judge_rung: Rung
|
||||
judge_model: str
|
||||
paths: Paths
|
||||
premises: str
|
||||
project_archive: pathlib.Path
|
||||
@@ -103,7 +104,7 @@ def rule(cycle: Cycle, transcript_path: str) -> Ruled | Stop:
|
||||
entries = read_transcript(transcript_path)
|
||||
if isinstance(entries, Failure):
|
||||
return Stop(1, entries.reason)
|
||||
verdict = judge(cycle.root, cycle.task, cycle.premises, cycle.records, render(entries), cycle.judge_rung, cycle.effects)
|
||||
verdict = judge(cycle.root, cycle.task, cycle.premises, cycle.records, render(entries), judge_rung(cycle.judge_model, cycle.route), cycle.effects)
|
||||
return verdict if isinstance(verdict, Stop) else Ruled(verdict)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user