|
|
|
@@ -76,16 +76,21 @@ class Reproduced(unittest.TestCase):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Report(unittest.TestCase):
|
|
|
|
|
def test_names_whether_a_missed_verdict_was_replayed_on_its_archived_prompt(self):
|
|
|
|
|
kept = Case("/code/p", "Do it.", TRANSCRIPT, "2026-10-14T10:00:00Z", FINISHED, pathlib.Path("/archive/p/c/judge/run.json"))
|
|
|
|
|
lines = report("claude-opus-5-5", REFERENCE, [kept], Replay([UNFINISHED], [], [])).split("\n")
|
|
|
|
|
self.assertIn(" /code/p 2026-10-14T10:00:00Z: archived Verdict: finished, replayed Verdict: unfinished on its archived prompt", lines)
|
|
|
|
|
|
|
|
|
|
def test_counts_the_verdicts_and_names_each_miss_and_the_lowest_rung(self):
|
|
|
|
|
cases = [case("2026-10-14T10:00:00Z", FINISHED), case("2026-10-14T10:00:01Z", INTERRUPTED)]
|
|
|
|
|
replay = Replay([UNFINISHED, INTERRUPTED], [Tried(MIDDLE, []), Tried(CHEAP, [Miss(cases[1], INTERRUPTED, FINISHED)])], MIDDLE)
|
|
|
|
|
self.assertEqual(report("claude-opus-5-5", REFERENCE, cases, replay).splitlines(), [
|
|
|
|
|
"Replayed 2 verdicts of claude-opus-5-5 projects: 1 Verdict: finished, 1 Verdict: interrupt.",
|
|
|
|
|
"The reference judge, claude-opus-5-5 at xhigh effort, reproduced 1. It returned another kind on:",
|
|
|
|
|
" /code/p 2026-10-14T10:00:00Z: archived Verdict: finished, replayed Verdict: unfinished",
|
|
|
|
|
" /code/p 2026-10-14T10:00:00Z: archived Verdict: finished, replayed Verdict: unfinished on a prompt rebuilt from today's records",
|
|
|
|
|
"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",
|
|
|
|
|
" /code/p 2026-10-14T10:00:01Z: archived Verdict: interrupt, replayed Verdict: finished on a prompt rebuilt from today's records",
|
|
|
|
|
"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()
|
|
|
|
@@ -98,7 +103,7 @@ class Report(unittest.TestCase):
|
|
|
|
|
climbs = [Tried(Rung("claude-fable-5-2", "low"), [Miss(cases[1], INTERRUPTED, FINISHED)]), Tried(Rung("claude-fable-5-2", "high"), [])]
|
|
|
|
|
self.assertEqual(report("claude-opus-5-5", REFERENCE, cases, Replay([FINISHED, INTERRUPTED], [Tried(MIDDLE, [])], MIDDLE, climbs)).splitlines()[2:5], [
|
|
|
|
|
"claude-fable-5-2 at low effort, a rung a review climbs to, missed 1:",
|
|
|
|
|
" /code/p 2026-10-14T10:00:01Z: archived Verdict: interrupt, replayed Verdict: finished",
|
|
|
|
|
" /code/p 2026-10-14T10:00:01Z: archived Verdict: interrupt, replayed Verdict: finished on a prompt rebuilt from today's records",
|
|
|
|
|
"claude-fable-5-2 at high effort, a rung a review climbs to, missed 0.",
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
@@ -312,6 +317,7 @@ class JudgeArchivedRuns(unittest.TestCase):
|
|
|
|
|
def test_splits_the_prompt_at_the_first_task_heading(self):
|
|
|
|
|
quoting = self.PROMPT.replace("Do it.", f"Quote:\n\n{TASK_HEADING}Ship slowly.", 1)
|
|
|
|
|
self.assertIsInstance(self.judged(quoting, answer="Ship fast.", question="Which?")[0], QuotedAnswer)
|
|
|
|
|
self.assertIsInstance(self.judged(quoting, answer="Quote:", question="Which?")[0], Interrupt)
|
|
|
|
|
|
|
|
|
|
def test_fails_before_the_judge_runs_on_a_prompt_without_a_heading(self):
|
|
|
|
|
for prompt in ("No headings at all.", f"{TASK_HEADING}Do it.", f"\n\n{TASK_HEADING}Do it.\n\nNo transcript heading."):
|
|
|
|
|