Archive every cycle's transcript and its session folder, however the cycle ends

This commit is contained in:
2026-10-02 16:00:14 +02:00
parent 9fb811c10a
commit 990963d586
8 changed files with 98 additions and 36 deletions
+3 -4
View File
@@ -22,6 +22,7 @@ class Interrupting:
@dataclasses.dataclass(frozen=True)
class Finishing:
transcript_path: str
verdict: Finished | Unfinished
@dataclasses.dataclass(frozen=True)
@@ -62,10 +63,8 @@ def transition(state: State, event: Event) -> State:
return Judging(transcript_path)
case Judging(transcript_path), Ruled(Interrupt(question=question)):
return Interrupting(transcript_path, question)
case Judging(transcript_path), Ruled(Finished()):
return Finishing(transcript_path)
case Judging(), Ruled(Unfinished()):
return Ended()
case Judging(transcript_path), Ruled(Finished() | Unfinished() as verdict):
return Finishing(transcript_path, verdict)
# 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)