Answer prose round 1: 0 🔴, 7 🟡 (0 misread); have the changelog restart loop-inbox, name the cut as dated in CHANGELOG.md, open the decision's Quality paragraph with the window's measurement, and move item 260 to 0.8.0
This commit is contained in:
+7
-4
@@ -108,7 +108,10 @@ def heading_commit(release: tuple[int, int, int], ref: str, cwd: str) -> str | N
|
||||
|
||||
|
||||
def release_reviewed(tag: str | None, ref: str, cwd: str, after: tuple[int, int, int] | None = None) -> bool | Failure:
|
||||
"""Whether ref holds, after tag or in all where tag is None, a commit titled as a release review opens: `Release review of <release>`. Where after is given, the version a branch with no tag counts as cut, a title counts only where its release is later."""
|
||||
"""Whether ref holds a commit titled as a release review opens, `Release review of <release>`: after tag, or anywhere where tag is None.
|
||||
|
||||
after is the version a branch with no tag counts as cut, or None. Where it is given, a title counts only where its release is later than after.
|
||||
"""
|
||||
titles = git("log", "--format=%s", f"{tag}..{ref}" if tag else ref, cwd=cwd)
|
||||
if isinstance(titles, Failure):
|
||||
return titles
|
||||
@@ -142,7 +145,7 @@ def next_release(found: list[Item], cut: LastCut) -> Upcoming | Cut | Unknown:
|
||||
"""The next release after cut, and whether work has landed towards it. found holds the plan's items.
|
||||
|
||||
Cut where the plan files items under the last cut's version or earlier, and Unknown where todo.md's texts since the cut cannot be read.
|
||||
Where the branch has no tag, the cut is cut_version's, so a release todo.md named whose items are all done still reads as the next release.
|
||||
Where the branch has no tag, todos_since holds every version of todo.md, so a release todo.md named whose items are all done still reads as the next release.
|
||||
"""
|
||||
earliest = min((item.release for item in found), default=None)
|
||||
version = cut_version(cut)
|
||||
@@ -161,7 +164,7 @@ def next_release(found: list[Item], cut: LastCut) -> Upcoming | Cut | Unknown:
|
||||
|
||||
|
||||
def cut_version(cut: LastCut) -> tuple[int, int, int] | None:
|
||||
"""The version cut counts as cut: its tag's; on a branch with no tag, the newest under a dated CHANGELOG.md heading, else BEFORE_FIRST_RELEASE. None where the tag names no version."""
|
||||
"""Which version is cut. It is the tag's, or None where the tag names no version. On a branch with no tag, it is the newest version under a dated CHANGELOG.md heading, else BEFORE_FIRST_RELEASE."""
|
||||
if cut.tag is None:
|
||||
return max(dated_headings(cut.changelog), default=BEFORE_FIRST_RELEASE)
|
||||
return version_of(cut.tag)
|
||||
@@ -172,7 +175,7 @@ def cut_name(cut: LastCut) -> str | None:
|
||||
if cut.tag is not None:
|
||||
return None if isinstance(cut.tag, Failure) else cut.tag
|
||||
headed = max(dated_headings(cut.changelog), default=None)
|
||||
return None if headed is None else f"{version(headed)}, under CHANGELOG.md's dated heading"
|
||||
return None if headed is None else f"{version(headed)} (dated in CHANGELOG.md)"
|
||||
|
||||
|
||||
def dated_headings(changelog: str | Failure) -> list[tuple[int, int, int]]:
|
||||
|
||||
@@ -20,7 +20,7 @@ def last_release(default: str, release: LastCut) -> str:
|
||||
if isinstance(release.tag, Failure):
|
||||
return f"Last version cut: cannot be read: {release.tag.reason}"
|
||||
named = cut_name(release)
|
||||
cut = f"Last version cut: {named or 'none'}{', with no tag' if named and release.tag is None else ''}."
|
||||
cut = f"Last version cut: {named or 'none'}."
|
||||
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."
|
||||
|
||||
@@ -9,11 +9,10 @@ with --worktree at the checkout root before each chunk's first worker, before it
|
||||
and quotes what it prints in the worker's prompt. It leaves the checkout as it is, and reads
|
||||
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 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`, and the commits counted follow the commit that added that heading; an
|
||||
undated heading doesn't count;
|
||||
- the last version cut: the newest v* tag on the default branch, or on a branch with no tag the
|
||||
newest version CHANGELOG.md heads `## X.Y.Z - YYYY-MM-DD`; an undated heading doesn't count.
|
||||
Then how many entries the default branch's CHANGELOG.md holds under ## Unreleased, or else how
|
||||
many commits followed the cut: the tag, or the commit that added that heading;
|
||||
- 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
|
||||
|
||||
@@ -368,7 +368,7 @@ class Render(unittest.TestCase):
|
||||
self.assertIn("cut: none", untagged)
|
||||
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("cut: 0.0.1 (dated in CHANGELOG.md).", 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):
|
||||
@@ -452,7 +452,7 @@ class Plans(unittest.TestCase):
|
||||
|
||||
def test_names_a_release_cut_under_a_dated_heading_as_the_last_cut_on_a_branch_with_no_tag(self):
|
||||
said = planned(EMPTY, LastCut(None, "## 0.0.1 - 2026-10-03\n", 0, []), "origin/main").why
|
||||
self.assertIn("the next release after the last cut, 0.0.1, under CHANGELOG.md's dated heading", said)
|
||||
self.assertIn("the next release after the last cut, 0.0.1 (dated in CHANGELOG.md)", said)
|
||||
|
||||
def test_finds_the_release_after_the_last_cut_finished_or_to_be_planned_where_the_plan_holds_no_item_for_it(self):
|
||||
named = "release 0.2.0, the next after the last cut, v0.1.0"
|
||||
|
||||
@@ -19,7 +19,7 @@ EACH_SEAT = "each comprehension seat"
|
||||
THE_SECURITY_PASS = "the security pass's subagent"
|
||||
|
||||
|
||||
# The worker's reading rule, from PR #376's trials, where it alone cut a worker's reading; it is the worker's, not CLAUDE.md's, since reviewers under a like rule missed findings: docs/decisions.md → "loop-claude: the worker's claude compacts its context …".
|
||||
# Workers only, not CLAUDE.md, which reviewers load too: a reviewer under a like rule missed findings.
|
||||
READING_RULE = "Read in small pieces: never read more than 80 lines of a file at once, nor take a tool output over 3,000 characters into your context."
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class Ask:
|
||||
|
||||
|
||||
def read_ask(path: pathlib.Path) -> Ask | None:
|
||||
"""The ask in path; None where a field has the wrong type, asked is no stamp utc_stamp.utc writes, or the ask names another session than path does."""
|
||||
"""The ask in path. None where a field has the wrong type, where utc_stamp.seconds cannot read asked, or where the ask names another session than path does."""
|
||||
try:
|
||||
data = json.loads(path.read_text(encoding="utf-8"))
|
||||
ask = Ask(**{**data, "state": ask_state(data["state"])})
|
||||
|
||||
+1
-1
@@ -10,5 +10,5 @@ def utc(at: float) -> str:
|
||||
|
||||
|
||||
def seconds(stamp: str) -> int:
|
||||
"""The seconds since the epoch that stamp, as utc writes it, names; ValueError where it is no such stamp."""
|
||||
"""The seconds since the epoch that stamp names, read in utc's format. Raises ValueError where time.strptime cannot read it so."""
|
||||
return calendar.timegm(time.strptime(stamp, STAMP))
|
||||
|
||||
Reference in New Issue
Block a user