From aef3a945e9bb5368ec5ec72e77471d3862fd1f17 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 30 Oct 2026 13:06:42 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20stability=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20count=20an?= =?UTF-8?q?=20untagged=20branch=20as=20cut=20below=200.0.0=20and=20test=20?= =?UTF-8?q?it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/chunk_pick.py | 6 +++--- bin/chunk_preflight/choices.py | 2 +- bin/test_chunk_pick.py | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/chunk_pick.py b/bin/chunk_pick.py index 7b8dcb81..91714a06 100644 --- a/bin/chunk_pick.py +++ b/bin/chunk_pick.py @@ -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): diff --git a/bin/chunk_preflight/choices.py b/bin/chunk_preflight/choices.py index 764e4bcb..4b0fa5b0 100644 --- a/bin/chunk_preflight/choices.py +++ b/bin/chunk_preflight/choices.py @@ -30,7 +30,7 @@ def planned(todo: str | Failure, cut: LastCut, default: str) -> Plan | NoItem: if isinstance(pick, ReadyToCut | ReviewDue | Unplanned): upcoming = f"release {version(pick.release)}, the next after {last_cut}" if pick.release else f"the next release after {last_cut}" if isinstance(pick, ReviewDue): - return NoItem(f"{where} holds no item for {upcoming}, and changes are unreleased, so that release's release review is due: no commit titled `Release review of ` has landed since the cut. This chunk is that review, as `~/.claude/skills/larv-review/SKILL.md` → \"Release review\" says; once it merges and the release holds no item, the release is ready to cut.") + return NoItem(f"{where} holds no item for {upcoming}, and changes are unreleased, so that release's release review is due: no commit titled `Release review of ` has landed {'since the cut' if cut.tag is not None else 'yet'}. This chunk is that review, as `~/.claude/skills/larv-review/SKILL.md` → \"Release review\" says; once it merges and the release holds no item, the release is ready to cut.") if isinstance(pick, ReadyToCut): return NoItem(f"{where} holds no item for {upcoming}, and changes are unreleased, and its release review has landed, so that release is finished and ready to cut. The working loop stops here. If todo.md renamed that release instead, add `- renamed to ` to todo.md's `## Renamed` section.") return NoItem(f"{where} holds no item for {upcoming}, and no change is unreleased, so that release is to be planned first.") diff --git a/bin/test_chunk_pick.py b/bin/test_chunk_pick.py index fb86370f..c04ef9a9 100644 --- a/bin/test_chunk_pick.py +++ b/bin/test_chunk_pick.py @@ -98,6 +98,10 @@ class ChunkItem(unittest.TestCase): with self.subTest(release=release): self.assertEqual(chunk_pick.chunk_item(plan_under(release), chunk_pick.LastCut(None, "", 4, naming(set()))), chunk_pick.Next(release, one(release))) + def test_calls_a_release_0_0_0_finished_on_a_branch_with_no_tag(self): + history = [HEADER + ROW.format(id=1, release="0.0.0"), HEADER] + self.assertEqual(chunk_pick.chunk_item([], chunk_pick.LastCut(None, "", 4, history)), chunk_pick.ReviewDue((0, 0, 0))) + def test_calls_a_release_that_never_had_a_tag_finished_once_the_plan_files_no_item_under_it(self): history = [HEADER + ROW.format(id=1, release="0.1.0") + ROW.format(id=2, release="0.1.1"), HEADER + ROW.format(id=2, release="0.1.1")] cut = lambda reviewed: chunk_pick.LastCut(None, "", 4, history, reviewed)