Answer prose round 1: 0 🔴, 5 🟡; word the rule by the change that moved the last items, rewrite the renamed and named_releases docstrings, move larv-review's renamed sentence after its definition, and split the changelog's first sentence

This commit is contained in:
2026-10-18 00:12:42 +02:00
parent 55a062bbdc
commit 308434f826
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -26,11 +26,11 @@ another round. It also lists each name in such a title that is not a pass.
needs-scoring-run takes the IDs of the todo.md items the chunk ships, none when it ships none, and
prints why the chunk is due a scoring run, or `No scoring run due.` It is due when the chunk ships
an item whose tagline names the comprehension floor, or when it leaves a release with no item in
the checkout's todo.md, less the shipped items, and work has landed towards that release. A release
whose items all moved to other releases, none leaving todo.md, was renamed and is due none. Work has
the checkout's todo.md, less the shipped items, and work has landed towards that release. Work has
landed when the chunk ships one of the release's items, or when the release is the earliest the
default branch's todo.md names and the default branch has a commit after its newest v* tag, or has
no v* tag.
no v* tag. A release whose last items all moved to other releases, none leaving todo.md, reads as
renamed and is due none.
A second scoring run of one head names itself `<PR or branch> rerun at <commit>`, so record-scoring
does not refuse it as a repeat of the first.
+3 -3
View File
@@ -19,7 +19,7 @@ MOVES = "Moves"
HEADER_START = "| ID | Release |"
# How the plan's earliest release stands to the version x.y.z the newest tag names, the last cut. "next": it is the earliest release after x.y.z that todo.md has named at that tag or since, or no tag names a version, or the tag cannot be read. "cut": it is x.y.z or earlier.
# Else the next release, the earliest named since the cut, holds no item: "finished" where work landed since the cut, and "unplanned" where none did. "unknown": todo.md's texts since the cut, or the count of work landed since it, cannot be read.
# A release named since the cut stays the next until a tag cuts it, unless renamed says it was renamed; larv_review/plan.py's emptied counts a release the same way.
# A release named since the cut stays the next until a tag cuts it, unless `renamed` finds it renamed; larv_review/plan.py's `emptied` skips the same releases.
Standing = typing.Literal["next", "cut", "finished", "unplanned", "unknown"]
# todo.md's ## Details section, its body the first group.
DETAILS = re.compile(r"^## Details\n(.*?)(?=^## |\Z)", re.M | re.S)
@@ -203,7 +203,7 @@ def landed(cut: LastCut) -> int | Failure:
def named_releases(todos: list[str] | Failure) -> set[tuple[int, int, int]] | Failure:
"""Each release the todo.md texts, oldest first, file items under, less each that renamed says a later text renamed and none names again; a text that does not parse names none."""
"""Each release the todo.md texts, oldest first, file items under, leaving out one that `renamed` finds a later text renamed, unless a text after that names it again; a text that does not parse names none."""
if isinstance(todos, Failure):
return todos
plans = [parsed for parsed in map(items, todos) if isinstance(parsed, list)]
@@ -214,7 +214,7 @@ def named_releases(todos: list[str] | Failure) -> set[tuple[int, int, int]] | Fa
def renamed(before: list[Item], after: list[Item]) -> set[tuple[int, int, int]]:
"""Each release before names and after does not whose items after all holds: no item left the plan from it, so it was renamed, never finished, as `docs/decisions.md` → `todo.md: a release whose last items all move …` says."""
"""Each release `before` names and `after` does not, where `after` still holds every item `before` filed under it: renamed, never finished, as `docs/decisions.md` → `todo.md: a release whose last items all move …` says."""
held = {item.id for item in after}
gone = {item.release for item in before} - {item.release for item in after}
return {release for release in gone if all(item.id in held for item in before if item.release == release)}