Answer prose round 1: 0 🔴, 9 🟡 (0 misread); say what each docstring's code does, give the outage step in plain words and keep each choice in one place
CI / tests (pull_request) Successful in 2m31s

This commit is contained in:
2026-11-15 19:42:51 +01:00
parent a62992d877
commit d2133c410f
5 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -18,12 +18,12 @@ def environment(project: Rung | None, route: Route) -> dict[str, str]:
def hands_rungs(environ: typing.Mapping[str, str]) -> bool:
"""Whether the environment names a project's and a worker's rung, as loop-claude's does for a project on its ladder. A reader asks before it reads the project's ladder, which handed needs."""
"""Whether the environment names a project's and a worker's rung, as loop-claude sets them for a project on its ladder. Where it names neither, no review launch is checked, so the caller skips reading the project's ladder."""
return bool(environ.get(PROJECT_RUNG) and environ.get(WORKER_RUNG))
def handed(environ: typing.Mapping[str, str], ladder: Ladder) -> tuple[Rung | None, Rung | None, int]:
"""The project's and the worker's rungs, each None when unset or not on ladder, the project's ladder, and the reviews' E + I, 0 when unset or not a whole number. An older loop-claude hands no E + I, and 0 steps no review up."""
"""The project's and the worker's rungs, each None when unset or not on ladder, and the reviews' E + I, 0 when unset or not a whole number. ladder is the project's. An older loop-claude hands no E + I, and 0 steps no review up."""
escape_and_impact = environ.get(ESCAPE_AND_IMPACT, "")
return on_the_ladder(environ.get(PROJECT_RUNG), ladder), on_the_ladder(environ.get(WORKER_RUNG), ladder), int(escape_and_impact) if escape_and_impact.isdecimal() else 0