Answer architecture round 1: 2 🔴, 8 🟡 (0 misread); split task-bench's benched into phases and its table into one column list, parse each stream once, move do-epic's parking out with pure move and news decisions, share the round summaries, rename scoring_due, and file the version question as item 517
CI / tests (pull_request) Successful in 5m2s

This commit is contained in:
2026-11-23 01:20:55 +01:00
parent 21200cb698
commit 0bf87b736e
29 changed files with 678 additions and 368 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import typing
from larv_review.agreement import agreement_report
from review_rules.comprehension_history import appended, DIMENSIONS, heading, Heading, latest_places, recorded, ruling_entry, scoring_entry, ScoringRun, vote_text
from larv_review.plan import checkout_plan, plan_reasons
from larv_review.scoring_due import checkout_plan, plan_reasons
from git_cli.git_repo import commit_exists
from larv_review.ruling import counted, overall, ruling, split, surplus, votes
from failure import Failure
+8 -12
View File
@@ -34,7 +34,7 @@ needs-scoring-run takes the IDs of the todo.md items the chunk ships, none when
prints why the chunk is due a scoring run, or `No scoring run due.` It is due when the chunk ships
a floor item, one whose tagline opens with `Reach the comprehension floor:`. It is also due when the
chunk leaves a release with no item in the project'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` and `landed_towards` say when. A release the checkout's
towards that release; bin/larv_review/scoring_due.py's `work_landed` and `landed_towards` say 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 chunk is also due one while no scoring run in the default branch's history is newer than the
commit of its second-newest v* tag, so a release cut unmeasured is caught up by the next chunk. A project whose
@@ -171,8 +171,9 @@ import sys
import time
import typing
from git_cli.git_repo import branch_titles, default_branch, git, top
from larv_review.reviewer_header import branch_summaries, reviewer_header
from review_rules.round_titles import cap, CAP, RELEASE_REVIEW_CAP, round_counts
from git_cli.git_repo import default_branch, git, top
from project_config.settings import DEFAULT_FLOOR
from failure import Failure
from larv_review.history_changes import history_changes
@@ -182,12 +183,10 @@ from larv_review.ruling_base import measured_commit
from larv_review.agreement import MIN_PAIRS
from larv_review.owed import owed_scoring_run
from review_rules.review_passes import PASSES, REVIEWERS
from larv_review.plan import plan_reasons
from larv_review.scoring_due import plan_reasons
from larv_review.scoring_setup import prepare_scoring
from larv_review.history_commands import read_agreement, read_places, record_ruling, record_scoring
from larv_review.reviewer_header import reviewer_header
from larv_review.round_title import round_title
from project_config.main import title_templates
class Command(typing.NamedTuple):
@@ -321,13 +320,10 @@ def show_ruling_base(default: str, home: pathlib.Path) -> Failure | None:
def round_count(default: str) -> Failure | None:
titles = branch_titles(default)
if isinstance(titles, Failure):
return titles
templates = title_templates(None, pathlib.Path.home())
if isinstance(templates, Failure):
return templates
for name, count in round_counts([templates.summary(title) for title in titles]).items():
summaries = branch_summaries(default, pathlib.Path.home())
if isinstance(summaries, Failure):
return summaries
for name, count in round_counts(summaries).items():
print(f"{name}: {count}{cap_note(count, cap(name)) if name in PASSES else ', not a pass: check the commit title'}")
return None
+1 -1
View File
@@ -1,7 +1,7 @@
import pathlib
import typing
from larv_review.plan import Emptied, plan_reasons
from larv_review.scoring_due import Emptied, plan_reasons
from review_rules.comprehension_history import entries
from failure import Failure
from git_cli.git_repo import file_at, git
+9 -5
View File
@@ -80,15 +80,19 @@ def unanswered_round(titles: list[str], pass_: str) -> int | Failure:
return done + 1
def reviewer_header(default: str, pass_: str, rerun: bool, home: pathlib.Path) -> str | Failure:
"""Writes the branch diff, the places and the plan's listing into the review folder, and returns the header that launches pass_'s reviewer in the pass's unanswered round, or its relaunch one rung up where rerun."""
def branch_summaries(default: str, home: pathlib.Path) -> list[str] | Failure:
"""The branch's commit titles since default, each read as its summary in the project's title templates, so round titles count under any template. rule-hook's round-cap reads them its own way: guarded, and counting none where git fails."""
titles = branch_titles(default)
if isinstance(titles, Failure):
return titles
templates = title_templates(None, home)
if isinstance(templates, Failure):
return templates
round_ = unanswered_round([templates.summary(title) for title in titles], pass_)
return templates if isinstance(templates, Failure) else [templates.summary(title) for title in titles]
def reviewer_header(default: str, pass_: str, rerun: bool, home: pathlib.Path) -> str | Failure:
"""Writes the branch diff, the places and the plan's listing into the review folder, and returns the header that launches pass_'s reviewer in the pass's unanswered round, or its relaunch one rung up where rerun."""
summaries = branch_summaries(default, home)
round_ = summaries if isinstance(summaries, Failure) else unanswered_round(summaries, pass_)
if isinstance(round_, Failure):
return round_
found = [top(), *(git(*args) for args in (["symbolic-ref", "--short", "HEAD"], ["rev-parse", "--short", "HEAD"], ["merge-base", "HEAD", default]))]
+4 -10
View File
@@ -1,23 +1,17 @@
"""round-title: print the opening of a round commit's title, counted from the round's report."""
import pathlib
from git_cli.git_repo import branch_titles, top
from larv_review.reviewer_header import branch_summaries, unanswered_round
from failure import Failure
from review_rules.review_folder import findings_in, review_folder, standing_report
from review_rules.round_titles import round_prefix
from project_config.main import title_templates
from larv_review.reviewer_header import unanswered_round
from git_cli.git_repo import top
def round_title(default: str, pass_: str, home: pathlib.Path) -> str | Failure:
"""The title prefix of pass_'s unanswered round, counted from that round's report in the chunk's review folder."""
titles = branch_titles(default)
if isinstance(titles, Failure):
return titles
templates = title_templates(None, home)
if isinstance(templates, Failure):
return templates
round_ = unanswered_round([templates.summary(title) for title in titles], pass_)
summaries = branch_summaries(default, home)
round_ = summaries if isinstance(summaries, Failure) else unanswered_round(summaries, pass_)
if isinstance(round_, Failure):
return round_
worktree = top()
@@ -1,3 +1,5 @@
"""When the plan calls a scoring run: a chunk that ships a floor item, one that empties a release work has landed towards, or one after a release cut unmeasured; and each reason it gives."""
import pathlib
from release_plan.release_standing import Cut, LastCut, next_release, project_plan, standing_of, Unknown
+1 -1
View File
@@ -15,7 +15,7 @@ sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
from larv_review.agreement import agreement_report, ruling_agreement, run_agreement
from review_rules.comprehension_history import appended, entries, HistoryChange, latest_places, Place, recorded, ruling_entry, scoring_entry, ScoringRun, Seat
from larv_review.history_commands import appended_to
from larv_review.plan import checkout_plan, Emptied, EMPTIED_WORDS, landed_towards, plan_reasons, scoring_run_due
from larv_review.scoring_due import checkout_plan, Emptied, EMPTIED_WORDS, landed_towards, plan_reasons, scoring_run_due
from review_rules import comprehension_history
from project_config.doubles import configured
from larv_review.ruling import counted, ruling, split, surplus, votes