From 7f8eabf178563771ef75ba6129215e9115e98b9e Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 3 Dec 2026 16:41:42 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20stability=20round=201:=202=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(2=20misread);=20read=20a=20?= =?UTF-8?q?judge=20prompt=20archived=20under=20the=20old=20name,=20and=20s?= =?UTF-8?q?ay=20a=20chunk=20left=20open=20starts=20fresh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/build_release/loop/chunk_windows.py | 1 + bin/judge_replay/archived_prompt.py | 6 ++++-- bin/judge_replay/test_judge_replay.py | 5 +++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/build_release/loop/chunk_windows.py b/bin/build_release/loop/chunk_windows.py index dabcbabb..f34b9efe 100644 --- a/bin/build_release/loop/chunk_windows.py +++ b/bin/build_release/loop/chunk_windows.py @@ -39,6 +39,7 @@ def item_of(chunk: str) -> int | None: def chunk_session(key: str, chunk: str, claude_code_transcripts: pathlib.Path) -> Session: """The worker's session for a chunk. A rerun finds a chunk left open by this name. "A " is the human's cue in the session picker that the session is the loop's.""" + # The rename from loop-claude changed this name, so a chunk left open under the old one starts a fresh session; the changelog says to finish those first. return session_named(f"A {key} build-release {chunk}", claude_code_transcripts) diff --git a/bin/judge_replay/archived_prompt.py b/bin/judge_replay/archived_prompt.py index eccc653a..13cf8ee5 100644 --- a/bin/judge_replay/archived_prompt.py +++ b/bin/judge_replay/archived_prompt.py @@ -11,8 +11,10 @@ from agent_cycle.worker_prompts import typed_answer def grounds_of(prompt: str, entries: list[Entry]) -> Grounds | Failure: """What the quotes of a judge run on prompt are checked against, as judge_prompt would have made it for the transcript's entries: the premises and the records before the task are quotable, the task is quotable as the evidence, and the transcript the judge was shown comes before the rules. The prompt is split on the headings judge_prompt writes, at the first of each; a Failure where it lacks one. Rules of an earlier wording stay part of the transcript, a slack that lets an evidence quote them pass.""" before_task, task_heading, after_task = prompt.partition(f"\n\n{TASK_HEADING}") - heading = transcript_heading(BUILD_RELEASE) + # A prompt archived before build-release was renamed names its driver loop-claude. + driver = next((name for name in (BUILD_RELEASE, "loop-claude") if transcript_heading(name) in after_task), BUILD_RELEASE) + heading = transcript_heading(driver) task, found_heading, shown = after_task.partition(heading) if not (task_heading and found_heading): return Failure(f"the archived prompt lacks the heading {TASK_HEADING.strip()!r} or {heading.strip()!r}, which judge_prompt writes") - return Grounds(shown.removesuffix(f"\n\n{judge_rules(ANSWER_DESTINATIONS, BUILD_RELEASE)}"), escalation_mark.after_mark(entries, 0), before_task, tuple(human_answers(entries, typed_answer)), task.removesuffix("\n\n")) + return Grounds(shown.removesuffix(f"\n\n{judge_rules(ANSWER_DESTINATIONS, driver)}"), escalation_mark.after_mark(entries, 0), before_task, tuple(human_answers(entries, typed_answer)), task.removesuffix("\n\n")) diff --git a/bin/judge_replay/test_judge_replay.py b/bin/judge_replay/test_judge_replay.py index b2580129..df34918d 100644 --- a/bin/judge_replay/test_judge_replay.py +++ b/bin/judge_replay/test_judge_replay.py @@ -411,6 +411,11 @@ class JudgeArchivedRuns(unittest.TestCase): self.assertEqual((grounds.quotable, grounds.task), ("HEAD: Ship fast.", "Do it.")) self.assertEqual(grounds_of(self.PROMPT, self.ENTRIES).shown, "Worker chose option B.\n[human] Use Postgres.") + def test_splits_a_prompt_archived_before_the_rename_under_its_old_driver_name(self): + old = f"HEAD: Ship fast.\n\n{TASK_HEADING}Do it.\n\n{transcript_heading('loop-claude')}Worker chose option B.\n[human] Use Postgres.\n\n{judge_rules(ANSWER_DESTINATIONS, 'loop-claude')}" + grounds = grounds_of(old, self.ENTRIES) + self.assertEqual((grounds.quotable, grounds.task, grounds.shown), ("HEAD: Ship fast.", "Do it.", "Worker chose option B.\n[human] Use Postgres.")) + def test_keeps_the_cost_and_the_run_of_a_rejected_reply(self): rejected, _ = self.judged(evidence="Never said.") self.assertEqual((rejected.cost, rejected.run.prompt), (0.25, self.PROMPT))