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:
2026-11-10 22:32:49 +01:00
parent f2fef1d32d
commit 998e295ef9
17 changed files with 19 additions and 22 deletions
+1 -1
View File
@@ -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):
+1 -1
View File
@@ -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"}:
+1 -1
View File
@@ -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.