Answer principles round 1: 0 🔴, 3 🟡 (0 misread); state listed's lock, let each module drop its own ended files, test run_loop's listing end to end

This commit is contained in:
2026-10-29 20:33:52 +01:00
parent 9f71b9aa91
commit 326866e85b
9 changed files with 79 additions and 33 deletions
+4 -3
View File
@@ -213,12 +213,13 @@ def run_loop(argv: list[str], env: typing.Mapping[str, str], paths: Paths, launc
def shown_items(show: Show, root: str, routed: int) -> typing.Callable[[tuple[int, ...]], None]:
"""What lists in loop-inbox the items a chunk takes, given those taken in; routed is the item it was routed on, 0 for none."""
return lambda taken_in: show(taken_items(fetched_todo(root), routed, taken_in))
"""What lists in loop-inbox the items a chunk takes, given those taken in; routed is the item it was routed on, 0 for none. It reads the taglines once, as the cycle starts."""
todo = fetched_todo(root)
return lambda taken_in: show(taken_items(todo, routed, taken_in))
def fetched_todo(root: str) -> str | Failure:
"""todo.md on the default branch, as last fetched."""
"""todo.md on the default branch, as last fetched. fetched_plan reads it too, but also the release tag, CHANGELOG.md and each todo.md since the tag, which the listing doesn't need."""
ref = default_ref(root, ORIGIN_TIMEOUT)
return ref if isinstance(ref, Failure) else file_at(ref, "todo.md", root)