Answer prose round 1: 0 🔴, 1 🟡; list no kinds of rejected reply in the changelog, say rejected throughout, and rewrap the help paragraph
This commit is contained in:
@@ -76,7 +76,7 @@ JUDGE_SCHEMA = {
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class Rejected(Failure):
|
||||
"""The judge replied, and loop-claude refused the reply for the reason; reply is what the judge returned, as json."""
|
||||
"""A judge reply loop-claude rejected: reason says why, reply holds the reply as json."""
|
||||
reply: str
|
||||
|
||||
|
||||
@@ -134,7 +134,6 @@ def verdict_from(output: object) -> Verdict | Failure:
|
||||
|
||||
|
||||
def judge(root: str, task: str, premises: str, records: str, rendered_transcript: str, rung: Rung, effects: Effects, keep: typing.Callable[[Rejected], Stop | None]) -> Verdict | Stop:
|
||||
"""keep sees each reply loop-claude rejected, the last of three included; a Stop from it ends the retrying."""
|
||||
return retried("judge", lambda: judge_once(root, task, premises, records, rendered_transcript, rung, effects), effects, lambda failure: keep(failure) if isinstance(failure, Rejected) else None)
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ UNKNOWN_RESET_POLL = 600
|
||||
|
||||
|
||||
def retried(who: str, attempt: typing.Callable[[], T | Failure | Limited], effects: Effects, keep: typing.Callable[[Failure], Stop | None] = lambda failure: None) -> T | Stop:
|
||||
"""The attempt's result, retried on a failure; keep sees each failure, the last of three included, and a Stop from it ends the retrying."""
|
||||
"""The attempt's result, retried on a failure. keep sees each failure, the third running included; a Stop from keep ends the retrying."""
|
||||
failures = 0
|
||||
while True:
|
||||
result = attempt()
|
||||
|
||||
@@ -120,7 +120,7 @@ def rule(cycle: Cycle, transcript_path: str) -> Ruled | Stop:
|
||||
|
||||
|
||||
def keep_rejection(cycle: Cycle, transcript_path: str, rejected: Rejected) -> Stop | None:
|
||||
"""Archives a judge reply that loop-claude refused, so the archive answers why a run exited 1 or a verdict took a retry."""
|
||||
"""Archives a judge reply loop-claude rejected, so the archive shows what the judge returned before a retry or an exit 1."""
|
||||
if unkept := archive(cycle.project_archive, transcript_path, cycle.task, outcomes.rejected(rejected.reason, rejected.reply, str(judge_of(cycle))), cycle.effects.now()):
|
||||
return Stop(1, unkept.reason)
|
||||
return None
|
||||
|
||||
@@ -30,12 +30,12 @@ copied to $LOOP_CLAUDE_TRANSCRIPTS/<key>/<chunk>/<sha256>.jsonl (default
|
||||
line with a timestamp, the same for every cycle of a chunk. Beside the copy, <sha256>.outcomes.md
|
||||
holds the verdict, with the transcript passage the judge rested it on, any passage it quoted to
|
||||
show an escalation trigger fired, and the judge's rung; each answer the judge quoted, with the
|
||||
question it answers; each judge reply the loop rejected, with why and the reply as json; and why
|
||||
the loop stopped. Each of these opens with its UTC time. Claude Code keeps a folder per session
|
||||
beside its transcript, holding the subagents'
|
||||
transcripts among other files; that folder, and every other file named after the session except
|
||||
the transcript, are copied into <chunk>/session/. A file there is replaced only by a version that
|
||||
grew from it. A file Claude Code rewrote lands beside its copy as <name>.<hash of its content>.
|
||||
question it answers; each judge reply the loop rejected, with the reason and the reply as json;
|
||||
and why the loop stopped. Each of these opens with its UTC time. Claude Code keeps a folder per
|
||||
session beside its transcript, holding the subagents' transcripts among other files; that folder,
|
||||
and every other file named after the session except the transcript, are copied into
|
||||
<chunk>/session/. A file there is replaced only by a version that grew from it. A file Claude Code
|
||||
rewrote lands beside its copy as <name>.<hash of its content>.
|
||||
|
||||
Every claude loop-claude starts runs the project's model, saved per <key> in
|
||||
~/.claude/loop-claude-models.json and read each cycle, unless routing, below, puts the worker,
|
||||
|
||||
Reference in New Issue
Block a user