Archive each judge run's prompt and reply beside its verdict, and replay judge-replay on the archived prompt #568

Merged
lilleman merged 9 commits from item-303 into main 2026-11-17 01:37:43 +01:00
Showing only changes of commit b067d8cda8 - Show all commits
+2 -2
View File
@@ -398,8 +398,8 @@ Worker: {OFF_LADDER}
named = re.findall(r"^Judge run: (judge/[0-9a-f]{64}\.json)$", kept, re.MULTILINE)
self.assertEqual(len(named), 3, kept)
runs = [json.loads((chunk / name).read_text()) for name in named]
self.assertEqual(sorted(found["prompt"] for found in runs), sorted(prompts))
self.assertEqual(sorted(json.dumps(found["reply"]) for found in runs), sorted(json.dumps(json.loads(reply.stdout)) for reply in (rejected, interrupted, finished)))
replies = [json.loads(reply.stdout) for reply in (rejected, interrupted, finished)]
self.assertEqual(sorted((found["prompt"], json.dumps(found["reply"])) for found in runs), sorted((prompt, json.dumps(reply)) for prompt, reply in zip(prompts, replies)))
self.assertEqual(sorted(path.name for path in (chunk / "judge").iterdir()), sorted(name.removeprefix("judge/") for name in named))
def test_stops_when_a_judge_run_cannot_be_archived(self):