Answer principles round 1: 0 🔴, 4 🟡; have next_release take the plan's items and spell out each expected pick

This commit is contained in:
2026-10-22 21:15:07 +02:00
parent 20c231457d
commit f690eb2477
3 changed files with 63 additions and 49 deletions
+2 -2
View File
@@ -32,8 +32,8 @@ def work_landed(release: tuple[int, int, int], shipped: list[Item], landed: tupl
def landed_towards(found: list[Item], cut: LastCut) -> tuple[int, int, int] | None | Failure:
"""The next release where work has landed towards it on the default branch, as `chunk_pick.next_release` tells both; None where there is none, or work has not landed. found is the default branch's plan."""
upcoming = next_release(cut, min((item.release for item in found), default=None))
"""The next release on the default branch, once work has landed towards it; None where there is none, or work has not landed. `chunk_pick.next_release` tells the next release and whether work landed. found is the default branch's plan."""
upcoming = next_release(found, cut)
if isinstance(upcoming, Unknown):
return Failure("could not tell the next release: the default branch's todo.md history cannot be read")
# Cut's release is the last cut's version or earlier, so no work lands towards it.