Answer the stability, product-owner and prose reviews' first round

This commit is contained in:
2026-10-02 09:17:16 +02:00
parent 6bd150c820
commit 57ddf715b3
11 changed files with 41 additions and 38 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ def run_judge(root: str, args: list[str], prompt: str, rendered_transcript: str,
if isinstance(verdict, Failure):
return Failure(f"{verdict.reason}; it replied: {proc.stdout.strip() or 'nothing'}")
if not grounded(verdict.evidence, rendered_transcript):
return Failure(f"the judge quoted {verdict.evidence!r}, nothing in the transcript" + (f", for the question: {verdict.question}" if isinstance(verdict, Interrupt) else ""))
return Failure(f"the judge quoted {verdict.evidence!r}, which is not in the transcript" + (f", for the question: {verdict.question}" if isinstance(verdict, Interrupt) else ""))
return verdict
+2 -4
View File
@@ -5,8 +5,6 @@ from loop_claude.effects import Effects
from loop_claude.failure import Failure
from loop_claude.stop import Stop
ATTEMPTS = 3
RETRY_DELAY_SECONDS = 60
T = typing.TypeVar("T")
@@ -17,7 +15,7 @@ def retried(who: str, attempt: typing.Callable[[], T | Failure], effects: Effect
result = attempt()
if not isinstance(result, Failure):
return result
if failures == ATTEMPTS:
if failures == 3:
return Stop(1, f"the {who} failed three times running: {result.reason}")
print(f"retrying the {who} in a minute: {result.reason}", file=sys.stderr)
effects.sleep(RETRY_DELAY_SECONDS)
effects.sleep(60)
+1 -1
View File
@@ -66,7 +66,7 @@ def transition(state: State, event: Event) -> State:
return Finishing(transcript_path)
case Judging(), Ruled(Unfinished()):
return Ended()
# The interrupt is a whole claude session on the terminal, so the judge rules again on what it left.
# The human works in the interrupt's claude session, so the judge rules again on the transcript it leaves.
case Interrupting(transcript_path), Answered():
return Judging(transcript_path)
case Finishing(), Archived():