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
|
||||
|
||||
Reference in New Issue
Block a user