Answer stability round 2: 0 🔴, 1 🟡; test the refusal on a ref that doesn't exist instead of a mock, and say why only Next names a release to empty

This commit is contained in:
2026-10-22 01:59:19 +02:00
parent f6f2ec86b1
commit 10abbaff9f
2 changed files with 5 additions and 8 deletions
+2 -2
View File
@@ -30,11 +30,11 @@ 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 release unreleased changes on the default branch have landed towards: the next release, as chunk-preflight names it (`chunk_pick.chunk_item`), where `chunk_pick.unreleased_changes` counts one or more. None where there is no such release or no such change; a Failure where either cannot be read. found is the default branch's plan."""
"""The release unreleased changes on the default branch have landed towards: the next release, as chunk-preflight names it (`chunk_pick.chunk_item`), where it holds items and `chunk_pick.unreleased_changes` counts one or more. None otherwise; a Failure where either cannot be read. found is the default branch's plan."""
pick = chunk_item(found, cut)
if isinstance(pick, Unknown):
return Failure("could not tell the next release from the default branch's tags and todo.md history")
# Next is the one pick with a release that holds items; Cut, Finished and Unplanned have none to empty.
# Only Next names a release a chunk can empty after work landed: Cut's is already cut, and Finished's and Unplanned's hold no item.
if not isinstance(pick, Next):
return None
changes = unreleased_changes(cut)