Name why a verdict is incomplete, say how to proceed off a terminal, and which claude could not start

This commit was merged in pull request #99.
This commit is contained in:
2026-09-28 16:49:17 +02:00
parent 7b1ee20c7c
commit 1be6ae8187
4 changed files with 15 additions and 10 deletions
+12 -7
View File
@@ -54,8 +54,8 @@ def judge(root, task, premises, transcript, model):
verdict = run_judge(root, args, prompt)
if isinstance(verdict, Failure):
failure = verdict.reason
elif not complete(verdict):
failure = "the judge returned no verdict"
elif reason := incomplete(verdict):
failure = reason
elif not grounded(verdict, transcript):
failure = f"the judge quoted {verdict['evidence']!r}, nothing in the transcript" + (f", for the question: {verdict['question']}" if verdict["interrupt"] else "")
else:
@@ -84,11 +84,16 @@ def judge_prompt(task, premises, transcript):
)
def complete(verdict):
typed = isinstance(verdict, dict) and all(
isinstance(verdict.get(name), bool if JUDGE_SCHEMA["properties"][name]["type"] == "boolean" else str) for name in JUDGE_SCHEMA["required"]
)
return typed and not (verdict["interrupt"] and not verdict["question"].strip())
def incomplete(verdict):
if not isinstance(verdict, dict):
return "the judge returned no verdict"
for name in JUDGE_SCHEMA["required"]:
kind = JUDGE_SCHEMA["properties"][name]["type"]
if not isinstance(verdict.get(name), bool if kind == "boolean" else str):
return f"the judge's verdict has no {name} of type {kind}"
if verdict["interrupt"] and not verdict["question"].strip():
return "the judge interrupted without a question"
return None
def grounded(verdict, transcript):