Answer architecture round 1: 0 🔴, 2 🟡; fail on a mark over a live release, pin the second run's reason wording, state the target is for the reader

This commit is contained in:
2026-10-18 09:35:44 +02:00
parent ac33c733c7
commit 28a3f9c5e9
6 changed files with 17 additions and 5 deletions
+1 -1
View File
@@ -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.
# SKILL.md → "Second run" keys on this wording; a test pins both.
reasons.append(f"leaves release {'.'.join(map(str, release))} with no plan item")
return reasons
+6
View File
@@ -293,6 +293,12 @@ class ScoringRunDue(unittest.TestCase):
before = [item(1, (0, 2, 1)), item(2, (0, 3, 0))]
self.assertEqual(scoring_run_due(before, [item(1, (0, 3, 0)), item(2, (0, 3, 0))], [], True, set()), ["leaves release 0.2.1 with no plan item"])
def test_words_the_emptied_release_reason_as_skill_md_s_second_run_quotes_it(self):
skill = (pathlib.Path(__file__).resolve().parents[2] / "skills" / "larv-review" / "SKILL.md").read_text()
self.assertIn("`leaves release … with no plan item`", skill)
reasons = scoring_run_due([item(1, (0, 1, 0))], [], [], True, set())
self.assertRegex(reasons[0], r"^leaves release [0-9.]+ with no plan item$")
def test_is_not_due_when_a_later_release_loses_its_last_item_unshipped(self):
before = [item(1, (0, 1, 0)), item(3, (0, 2, 0))]
self.assertEqual(scoring_run_due(before, before[:1], [], True, set()), [])
+6 -2
View File
@@ -60,8 +60,9 @@ A valid todo.md; ## Details and each item's detail are optional:
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. A release whose
items all moved to other releases without a mark reads as finished, so the human cuts it.
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. 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
@@ -206,6 +207,9 @@ def rank(text: str, readme: str, decisions: str) -> Ranked | Failure:
return uncited
if isinstance(marked := renames(text), Failure):
return marked
if live := next((item for item in items if item.release in marked), None):
release = ".".join(map(str, live.release))
return Failure(f"todo.md marks release {release} renamed but files item {live.id} under it; drop the mark or move the item")
scored = ordered(items, scoring)
if isinstance(scored, Failure):
return scored
+2
View File
@@ -486,6 +486,8 @@ class Standing(unittest.TestCase):
self.assertIsInstance(failed, Failure)
self.assertIn("## Renamed", failed.reason)
self.assertIsInstance(rank_todo.rank(TODO + "\n## Renamed\n\n- 0.2.1 renamed to 0.3.0\n", README, DECISIONS), rank_todo.Ranked)
live = rank_todo.rank(TODO + "\n## Renamed\n\n- 0.2.0 renamed to 0.3.0\n", README, DECISIONS)
self.assertEqual(live, Failure("todo.md marks release 0.2.0 renamed but files item 1 under it; drop the mark or move the item"))
class Main(unittest.TestCase):
+1 -1
View File
@@ -217,7 +217,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. Without such a line, a release whose items all moved to other releases reads as finished or deferred, and the human cuts it."""
"""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."""
marked: set[tuple[int, int, int]] = set()
for body in sections(todo).get("Renamed", []):
for line in body.splitlines():