Answer stability round 2: 0 🔴, 1 🟡 (0 misread); count an untagged branch as cut below 0.0.0 and test it

This commit is contained in:
2026-10-30 13:06:42 +01:00
parent 8b1ba3a133
commit aef3a945e9
3 changed files with 8 additions and 4 deletions
+3 -3
View File
@@ -7,8 +7,8 @@ from failure import Failure
from todo_table import Item, items, next_item, release_of, renames
from markdown_text import sections
# The version a branch with no v* tag counts as cut, so that every release todo.md names comes after it.
BEFORE_FIRST_RELEASE = (0, 0, 0)
# The version a branch with no v* tag counts as cut: below every release, 0.0.0 included, so that every release todo.md names comes after it.
BEFORE_FIRST_RELEASE = (-1, 0, 0)
@dataclasses.dataclass(frozen=True)
@@ -137,7 +137,7 @@ def next_release(found: list[Item], cut: LastCut) -> Upcoming | Cut | Unknown:
cut_version = BEFORE_FIRST_RELEASE if untagged else version_of(cut.tag)
if cut_version is None:
return Upcoming(earliest, True, landed(cut))
if earliest is not None and earliest <= cut_version and not untagged:
if earliest is not None and earliest <= cut_version:
return Cut(earliest)
named = named_releases(cut.todos_since)
if isinstance(named, Failure):