Answer prose round 1: 0 🔴, 1 🟡; decline restating the rule in the help, since the item asks it to point to work_landed; reword the rest

This commit is contained in:
2026-10-22 00:49:58 +02:00
parent 41b8cc9a2d
commit 46c9dbe131
2 changed files with 8 additions and 7 deletions
+4 -4
View File
@@ -29,10 +29,10 @@ 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;
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.
an item whose tagline names the comprehension floor. It is also due when the chunk leaves a release
with no item in the checkout's todo.md, once the shipped items are set aside, 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 `<PR or branch> rerun at <commit>`, so record-scoring
does not refuse it as a repeat of the first.
+4 -3
View File
@@ -7,9 +7,9 @@ from todo_table import Item, items, NoItemsTable, renames, version
def scoring_run_due(before: list[Item], after: list[Item], ships: list[int], committed: 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, committed whether `committed_since_release` holds for the default branch, and renamed the releases the chunk's plan marks renamed.
"""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 of the items the chunk ships, committed whether `committed_since_release` holds for the default branch, 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. 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. 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)):
@@ -24,8 +24,9 @@ def scoring_run_due(before: list[Item], after: list[Item], ships: list[int], com
return reasons
# larv-review --help points here rather than restating the rule, so the rule is written once.
def work_landed(release: tuple[int, int, int], shipped: list[Item], next_release: tuple[int, int, int] | None, committed: bool) -> bool:
"""Whether work has landed towards release, for the scoring-run trigger. 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 committed holds: the default branch has a commit after its newest v* tag, or any commit when it has no v* tag."""
"""Whether work has landed towards release, for the scoring-run trigger. It has when the chunk ships one of the release's items. It has too when the release is next_release, the earliest the default branch's plan names, and committed holds: the default branch has a commit after its newest v* tag, or any commit when it has no v* tag."""
return any(item.release == release for item in shipped) or (release == next_release and committed)