From d459c2315b5164bf1a773617e59704c8207f4fed Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 22 Oct 2026 00:43:40 +0200 Subject: [PATCH] State when work has landed towards a release once, in work_landed --- bin/larv_review/main.py | 8 +++----- bin/larv_review/plan.py | 9 +++++++-- docs/reading-cost.md | 4 ++++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/bin/larv_review/main.py b/bin/larv_review/main.py index 10b189f4..de6038df 100644 --- a/bin/larv_review/main.py +++ b/bin/larv_review/main.py @@ -30,11 +30,9 @@ 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. 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. 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. +the checkout's todo.md, less the shipped items, and work has landed towards that release; +bin/larv_review/plan.py's `work_landed` says when. 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. A second scoring run of one head names itself ` rerun at `, so record-scoring does not refuse it as a repeat of the first. diff --git a/bin/larv_review/plan.py b/bin/larv_review/plan.py index 7f2e070c..60eefb14 100644 --- a/bin/larv_review/plan.py +++ b/bin/larv_review/plan.py @@ -9,7 +9,7 @@ from todo_table import Item, items, NoItemsTable, renames, version 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. + 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. 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)): @@ -18,12 +18,17 @@ def scoring_run_due(before: list[Item], after: list[Item], ships: list[int], lan reasons = [f"ships item {item.id}, which names the comprehension floor" for item in shipped if "comprehension floor" in item.tagline.lower()] 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): + if work_landed(release, shipped, next_release, landed): # SKILL.md → "Second run" keys on this wording. reasons.append(f"leaves release {version(release)} with no plan item") return reasons +def work_landed(release: tuple[int, int, int], shipped: list[Item], next_release: tuple[int, int, int] | None, landed: bool) -> bool: + """Whether work has landed towards release. It has when the chunk ships one of the release's items, or when the release is next_release, the earliest the default branch's plan names, and landed holds. larv-review's help points here.""" + return any(item.release == release for item in shipped) or (release == next_release and landed) + + def emptied(before: list[Item], after: list[Item], shipped: list[Item], renamed: set[tuple[int, int, int]]) -> list[tuple[int, int, int]]: """Each release the default branch's plan or a shipped item names that the chunk's plan, less the shipped items, names no longer, unless the chunk's plan marks it renamed.""" named = {item.release for item in before + shipped} diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 48593fc8..e60317fc 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -734,3 +734,7 @@ Read most (opens and searches): - `bin/routing_figures/measure.py` 1 - `bin/score_outcomes/outcomes.py` 1 - `docs/decisions.md` 1 + +## Reading cost, chunk 4527b73a80f1, finished 2026-10-21T22:42:41Z + +63554 new input tokens before the first commit.