Answer prose round 1: 0 🔴, 6 🟡; record the rename rule in the decision log, cut false and duplicate clauses, rewrite the help and rules bullets, file the sweep as item 190

This commit is contained in:
2026-10-18 09:56:53 +02:00
parent eae4ee9fb1
commit 63392cea66
11 changed files with 26 additions and 20 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ def planned(todo: str | Failure, cut: LastCut, default: str) -> Plan | NoItem:
return NoItem(f"{where} files items under release {version(earliest)}, which is not after the last cut, {cut.tag}; ask the human which release they belong to.")
gap = f"{where} holds no item for the next release after the last cut, {cut.tag}, and"
if stands == "finished":
return NoItem(f"{gap} work has landed since, so that release is finished and ready to cut, and the working loop stops here. If todo.md renamed that release instead, add `- <old release> renamed to <new release>` under its `## Renamed`.")
return NoItem(f"{gap} work has landed since, so that release is finished and ready to cut, and the working loop stops here. If todo.md renamed that release instead, add `- <old release> renamed to <new release>` to todo.md's `## Renamed` section.")
if stands == "unplanned":
return NoItem(f"{gap} no work has landed since, so that release is to be planned first.")
if stands == "unknown":
+1 -2
View File
@@ -34,8 +34,7 @@ the checkout's todo.md, less the shipped items, and work has landed towards that
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. A release the checkout's todo.md marks renamed in its ## Renamed section, as
`- 0.2.1 renamed to 0.3.0`, is due none; one whose items all moved to other releases unmarked was
deferred, and is due one.
`- 0.2.1 renamed to 0.3.0`, 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.
+2 -2
View File
@@ -9,7 +9,7 @@ from larv_review.git import landed_since_release
def scoring_run_due(before: list[Item], after: list[Item], ships: list[int], landed: bool, renamed: set[tuple[int, int, int]]) -> list[str] | Failure:
"""Why the plan calls a scoring run, empty when it does not. before is the default branch's plan, after the chunk's, ships the IDs it ships, landed whether the default branch holds a commit after its newest release tag, and renamed the releases the chunk's plan marks renamed.
A chunk that ships an item naming the floor is due one, so it can prove the floor met. So is a chunk that empties a release after work has landed towards it, so no release ends unmeasured, short of one renamed as below. Work has landed when the chunk ships one of the release's items, or when the release is the earliest one `before` names and `landed` holds. A release the chunk's plan marks renamed is due none; one whose last items moved to other releases unmarked was deferred, and is due one.
A chunk that ships an item naming the floor is due one, so it can prove the floor met. So is a chunk that empties a release after work has landed towards it, so no release ends unmeasured, short of one renamed as below. Work has landed when the chunk ships one of the release's items, or when the release is the earliest one `before` names and `landed` holds. A release the chunk's plan marks renamed is due none.
"""
plan = {item.id: item for item in before + after}
if unknown := sorted(set(ships) - set(plan)):
@@ -19,7 +19,7 @@ def scoring_run_due(before: list[Item], after: list[Item], ships: list[int], lan
next_release = min((item.release for item in before), default=None)
for release in emptied(before, after, shipped, renamed):
if any(item.release == release for item in shipped) or (release == next_release and landed):
# SKILL.md → "Second run" keys on this wording; a test pins both.
# SKILL.md → "Second run" keys on this wording.
reasons.append(f"leaves release {'.'.join(map(str, release))} with no plan item")
return reasons
+2 -2
View File
@@ -62,8 +62,8 @@ on the item chunk-preflight names, read from todo.md on the default branch as th
fetched it (todo_table.chunk_item). That item is the earliest release's top item that does not wait,
but only where that release is the next one: the earliest after the newest vX.Y.Z tag that todo.md
has named at that tag or since, skipping a release its ## Renamed section marks renamed, or, where
no tag names a version, the earliest release. Otherwise no item routes the chunk. An item waits while it is marked question, or while an
item that blocks it is still in the table. The item's L
no tag names a version, the earliest release. Otherwise no item routes the chunk. An item waits
while it is marked question, or while an item that blocks it is still in the table. The item's L
picks the worker's rung, stepping from the model's cheapest rung by WORKER_STEPS in
bin/model_routing/ladder.py, below it for a low L; without such an item, or with its L, E or I
unscored, the chunk runs on the model's cheapest rung. The
+4 -5
View File
@@ -59,16 +59,15 @@ A valid todo.md; ## Details and each item's detail are optional:
loop. An ID at or above Next ID fails; one below it that the table no longer holds was finished
or deleted, and is dropped.
- ## Items holds the table and nothing else: an order goes in the scores or the Blocked by column.
- ## Renamed is optional: one line `- 0.2.1 renamed to 0.3.0` per release the plan renamed. The tools
skip a marked release when they pick the next one, and call no scoring run for it; they read only
the old release, the new one is for the reader. No item may sit under a marked release. Delete a
line once a tag at or past its release is cut. A release whose items all moved to other releases
without a mark reads as finished, so the human cuts it.
- The table holds the columns above. One missing L, E or I fails, and so does one with a column this
version does not know, since writing it would drop that column.
- A table in the old shape, with C, A, G and Goals columns in place of L, E, I and Moves, still
ranks, by a formula over R, S, A, G and W and a | Goal | W | table that weighs every README goal, W
being the heaviest cited goal's weight; ranking it says to reshape it.
- ## Renamed is optional: one line `- 0.2.1 renamed to 0.3.0` per renamed release. chunk-preflight,
loop-claude and larv-review skip the line's first release, and ignore the second, which is for the
reader. No item may sit under a marked release, and a line goes once a tag at or past its first
release is cut. A release whose items all moved elsewhere without a line reads as finished.
Exit 1, saying why, on bad arguments, a file that cannot be read or written, a todo.md, README.md or
docs/decisions.md that breaks the rules above, an item that is not exempt scoring under the bar, or
-1
View File
@@ -498,7 +498,6 @@ class Standing(unittest.TestCase):
def test_fails_to_name_releases_when_the_newest_plan_marks_one_in_a_form_it_cannot_read(self):
plan = "## Items\n\n| ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score |\n|---|---|---|---|---|---|---|---|---|---|---|---|\n| 1 | 0.3.0 | | | **Do 1.** | 1 | 1 | 1 | 1 | 1 | 1 by 1 | 10.0 |\n"
self.assertIsInstance(todo_table.named_releases([plan, plan + "\n## Renamed\n\nsoon\n"]), Failure)
self.assertEqual(todo_table.named_releases([plan + "\n## Renamed\n\nsoon\n", plan]), {(0, 3, 0)})
class Main(unittest.TestCase):
+4 -3
View File
@@ -23,8 +23,9 @@ HEADER_START = "| ID | Release |"
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)
# One line of todo.md's ## Renamed section, the release it renamed and the one it became.
# A release's version, such as 0.2.1.
RELEASE = r"[0-9]+\.[0-9]+\.[0-9]+"
# One line of todo.md's ## Renamed section: the release it renamed and the one it became.
RENAME = re.compile(rf"- ({RELEASE}) renamed to ({RELEASE})")
# Each goal an item names, in its order, with how far the item moves it; None in OLD_SHAPE, whose Goals cell names no move.
Moves = tuple[tuple[str, int | None], ...]
@@ -206,7 +207,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, leaving out one that a later text marks renamed, unless a text after that files items under it again. A text whose items do not parse names none; the newest text's marks failing to parse fails the whole, since a release left unmarked would read as finished."""
"""Each release the todo.md texts, oldest first, file items under. A release leaves the set when a text marks it renamed, and returns when a later text files items under it again. A text whose items or marks do not parse names none, except the newest: its marks failing to parse fails the whole, since the release they should have excluded would read as finished."""
if isinstance(todos, Failure):
return todos
if todos and isinstance(newest := renames(todos[-1]), Failure):
@@ -220,7 +221,7 @@ def named_releases(todos: list[str] | Failure) -> set[tuple[int, int, int]] | Fa
def renames(todo: str) -> set[tuple[int, int, int]] | Failure:
"""Each release todo.md's ## Renamed section says was renamed, as `- 0.2.1 renamed to 0.3.0`, so never finished; the new release is for the reader. Without such a line, a release whose items all moved to other releases reads as finished or deferred, and the human cuts it, so a forgotten mark costs one interrupt, never a silent skip. A panel of three readers seated as lilleman picked the spelling 3-0 over `- 0.2.1 → 0.3.0` and a `Renamed 0.2.1 = 0.3.0` line under ## Scoring."""
"""Each release todo.md's ## Renamed section says was renamed, as `- 0.2.1 renamed to 0.3.0`, so never finished; the tools read only the old release. `docs/decisions.md` → `todo.md: one table …` gives the rule and the spelling's pick."""
marked: set[tuple[int, int, int]] = set()
for body in sections(todo).get("Renamed", []):
for line in body.splitlines():