Answer the prose review's first round, ship under the floor, and plan giving the judge the decisions

This commit is contained in:
2026-10-01 23:38:06 +02:00
parent dbf3c6e27a
commit 1514327d34
7 changed files with 17 additions and 18 deletions
+2 -3
View File
@@ -52,7 +52,7 @@ def step(cycle, state: Active) -> Event | Stop:
def work(cycle) -> WorkerRan | Stop:
# Asked at each attempt: a failed one may have opened the session.
# session_open runs inside the lambda: a failed attempt may have opened the session.
if stop := retried("worker", lambda: run_worker(cycle.root, worker_args(cycle.task, cycle.session, cycle.models.worker, session_open(cycle.session)), cycle.effects), cycle.effects):
return stop
path = transcript_file(cycle.session)
@@ -68,7 +68,7 @@ def rule(cycle, transcript_path) -> Ruled | Stop:
def ask(cycle, transcript_path, question) -> Answered | Stop:
# The interrupt appends to this transcript, so it is archived at each question and judged anew after.
# The interrupt appends to this transcript, so it is archived at each question.
if failure := archive(cycle.project, transcript_path, f"Task: {cycle.task}\n\nVerdict: interrupt\n\n{question}", cycle.paths):
return Stop(1, failure.reason)
return interrupt(cycle.root, cycle.session.id, cycle.models.worker, transcript_path, question, cycle.paths, cycle.effects) or Answered()
@@ -82,5 +82,4 @@ def close(cycle, transcript_path) -> Archived | Stop:
def session_open(session) -> bool:
"""A run resumes the session only while its transcript exists."""
return bool(transcript_file(session))