Answer product-owner round 1: 0 🔴, 2 🟡 (0 misread); count an untagged branch's unreleased commits from the commit that dated its heading, and drop the changelog's advice to restart loops
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"""The lines the preflight prints, stated from what it gathered."""
|
||||
from todo_table import bundle_candidates, BUNDLE_MAX_R, Item, ships_alone, version
|
||||
from chunk_pick import cut_name, LastCut, unreleased_entries
|
||||
from chunk_pick import cut_name, dated_headings, LastCut, unreleased_entries
|
||||
from failure import Failure
|
||||
from chunk_preflight.gathered import Forge, Gathered, ItemFacts, NamedPath, NoItem, Plan, Ran
|
||||
from chunk_preflight.choices import PULLS_LIST
|
||||
@@ -24,7 +24,8 @@ def last_release(default: str, release: LastCut) -> str:
|
||||
entries = unreleased_entries(release.changelog) if isinstance(release.changelog, str) else None
|
||||
if entries is not None:
|
||||
return f"{cut} Unreleased: {counted(entries, 'entry', 'entries')} under CHANGELOG.md → ## Unreleased."
|
||||
since = f"since {release.tag}" if release.tag else f"on {default}"
|
||||
headed = max(dated_headings(release.changelog), default=None) if release.tag is None else None
|
||||
since = f"since {release.tag}" if release.tag else f"since CHANGELOG.md dated {version(headed)}" if headed else f"on {default}"
|
||||
commits = f"the commits {since} cannot be counted: {release.commits.reason}" if isinstance(release.commits, Failure) else f"{counted(release.commits, 'commit', 'commits')} {since}"
|
||||
changelog = f"CHANGELOG.md cannot be read: {release.changelog.reason}" if isinstance(release.changelog, Failure) else "no ## Unreleased in CHANGELOG.md"
|
||||
return f"{cut} Unreleased: {commits}; {changelog}."
|
||||
|
||||
@@ -10,9 +10,10 @@ and quotes what it prints in the worker's prompt. It leaves the checkout as it i
|
||||
todo.md as the default branch holds it, the plan loop-claude routes on. It prints:
|
||||
|
||||
- the last version cut, and how many entries the default branch's CHANGELOG.md holds under
|
||||
## Unreleased, or else how many commits followed the tag. The last cut is the newest v* tag on
|
||||
## Unreleased, or else how many commits followed the cut. The last cut is the newest v* tag on
|
||||
the default branch. On a branch with no tag, it is the newest version CHANGELOG.md heads
|
||||
`## X.Y.Z - YYYY-MM-DD`; an undated heading doesn't count;
|
||||
`## X.Y.Z - YYYY-MM-DD`, and the commits counted follow the commit that added that heading; an
|
||||
undated heading doesn't count;
|
||||
- the next release and its first item that does not wait, the item loop-claude routes on, with
|
||||
its L and E + I. An item waits while it is marked question, or while an item still in todo.md
|
||||
blocks it. Where the last cut is a version x.y.z, the next release is the earliest after x.y.z
|
||||
@@ -21,7 +22,7 @@ todo.md as the default branch holds it, the plan loop-claude routes on. It print
|
||||
renamed, so a release whose items are all done still reads as next.
|
||||
Where the next release holds no item, it says so, naming it where todo.md named it since the cut:
|
||||
its release review due where changes are unreleased (the ## Unreleased entries, or else the
|
||||
commits since the tag) and no commit titled `Release review of <release>` followed the tag,
|
||||
commits since the cut) and no commit titled `Release review of <release>` followed the tag,
|
||||
finished and ready to cut once one did, and else to be planned first. On a branch with no tag,
|
||||
such a commit counts only where its <release> is after the version under the dated heading.
|
||||
Where todo.md's earliest release is x.y.z or earlier, it says todo.md files items under a release
|
||||
|
||||
@@ -369,6 +369,7 @@ class Render(unittest.TestCase):
|
||||
self.assertIn("1 commit on origin/main", untagged)
|
||||
headed = rendered(NoItem("x."), LastCut(None, "## 0.0.1 - 2026-10-03\n", 1, []))
|
||||
self.assertIn("cut: 0.0.1, under CHANGELOG.md's dated heading, with no tag.", headed)
|
||||
self.assertIn("1 commit since CHANGELOG.md dated 0.0.1", headed)
|
||||
|
||||
def test_states_why_the_changelog_and_the_commits_since_the_last_cut_cannot_be_read(self):
|
||||
said = rendered(NoItem("x."), LastCut("v0.1.0", Failure("changelog unreadable"), Failure("count unreadable"), []))
|
||||
|
||||
Reference in New Issue
Block a user