Answer the architect: fail a judge that answers without interrupting, read every checkout file through one function
This commit is contained in:
@@ -14,7 +14,8 @@ from loop_claude.stop import Stop
|
||||
JUDGED_TRANSCRIPT_TAIL = 400000
|
||||
|
||||
JUDGE_RULES = (
|
||||
"Decide whether the human must now be interrupted. interrupt=true when any of these appear:\n"
|
||||
"Decide whether the agent has something open that the human, or README.md and the project's records, "
|
||||
"must answer. interrupt=true when any of these appear:\n"
|
||||
"- the agent asks the human anything, seeks approval, or says a decision is the human's\n"
|
||||
"- it carried on under an assumption that decides the deliverable, that the human could "
|
||||
"reasonably reject and that neither README.md nor the project's records settle; a caveat about "
|
||||
@@ -108,6 +109,8 @@ def verdict_from(output: object) -> Verdict | Failure:
|
||||
if not isinstance(output.get(name), kind):
|
||||
return Failure(f"the judge's reply has no {name} of type {JSON_TYPES[kind]}")
|
||||
# An interrupt outranks finished: the human answers before the chunk can close.
|
||||
if output["answer"].strip() and not output["interrupt"]:
|
||||
return Failure("the judge answered without interrupting")
|
||||
if output["interrupt"]:
|
||||
if not output["question"].strip():
|
||||
return Failure("the judge interrupted without a question")
|
||||
|
||||
Reference in New Issue
Block a user