Answer prose round 1: 0 🔴, 9 🟡 (0 misread); docstrings say what the code does, and each fact sits in one place
This commit is contained in:
@@ -44,7 +44,7 @@ def routed(route: Route | None, project: Rung | None, model: str, archived: typi
|
||||
|
||||
|
||||
def archived_route(archive_folder: pathlib.Path, loop: Loop) -> Route | None:
|
||||
"""The route the latest verdict archived for the loop's open chunk names; None for a chunk not yet judged."""
|
||||
"""The route named by the latest verdict archived for the loop's open chunk; None for a chunk not yet judged."""
|
||||
transcript = transcript_file(loop.session)
|
||||
worker = latest_worker(archive_folder, transcript) if transcript else None
|
||||
if isinstance(worker, Failure):
|
||||
|
||||
@@ -68,7 +68,7 @@ def decoded_ids(value: object) -> tuple[int, ...]:
|
||||
|
||||
|
||||
def decoded_route(value: object) -> Route | None:
|
||||
"""The Route the JSON holds; None for null. dataclasses.asdict wrote it: a worker line's fields, but with the rung nested and the unfinished count beside them, so route_of decodes it once flattened."""
|
||||
"""The Route the JSON holds; None for null. dataclasses.asdict wrote it as a worker line's fields, with the rung nested and the unfinished count added. route_of reads it once the rung's model and effort are lifted to the top and the count is set aside."""
|
||||
if value is None:
|
||||
return None
|
||||
if not isinstance(value, dict) or not isinstance(value.get("rung"), dict) or not value["rung"].keys() <= {"model", "effort"} or value.keys() & {"model", "effort"}:
|
||||
|
||||
@@ -10,7 +10,7 @@ from claude_code.session import Session
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class Loop:
|
||||
"""One run of loop-claude, as it stays from its first cycle to its last; run_loop builds it once."""
|
||||
"""What stays the same through one run of loop-claude; run_loop builds it once per process, so a reload builds it afresh."""
|
||||
# The checkout the loop runs in. LoopRun.root names it too, since a reload hands it on there.
|
||||
root: str
|
||||
# The worker's session, under whose id loop-inbox lists the loop and its questions.
|
||||
|
||||
Reference in New Issue
Block a user