Archive each judge run's prompt and json reply beside the verdict it gave, and replay from the archived prompt
CI / tests (pull_request) Failing after 2m45s

This commit is contained in:
2026-11-16 23:42:36 +01:00
parent 5bb49dc623
commit e1d2eae7f4
14 changed files with 248 additions and 46 deletions
+5 -2
View File
@@ -4,7 +4,7 @@ import dataclasses
import pathlib
import typing
from transcript_archive.outcomes import ANSWERED, FINISHED, first_verdict, INTERRUPTED, task_of, UNFINISHED
from transcript_archive.outcomes import ANSWERED, FINISHED, first_verdict, INTERRUPTED, judge_run_at, task_of, UNFINISHED
from failure import Failure
from loop_claude.verdicts import Finished, Interrupt, QuotedAnswer, Unfinished, Verdict
from rung_replay.search import Replay
@@ -22,6 +22,8 @@ class Case:
transcript: pathlib.Path
at: str
archived_kind: Kind
# The judge run the archive kept beside the verdict, which holds the prompt the judge read; None where it kept none.
judge_run: pathlib.Path | None = None
def case_from(root: str, outcomes: str, transcript: pathlib.Path) -> Case | None:
@@ -32,7 +34,8 @@ def case_from(root: str, outcomes: str, transcript: pathlib.Path) -> Case | None
task, verdict = task_of(outcomes), first_verdict(outcomes)
if task is None or verdict is None:
return None
return Case(root, task, transcript, *verdict)
run = judge_run_at(outcomes, verdict[0])
return Case(root, task, transcript, *verdict, transcript.parent / run if run else None)
def sample(cases: list[Case], per_kind: int) -> list[Case]: