Answer architecture round 1: 4 🔴, 5 🟡 (0 misread); one-way plan packages with a plan core and an Atlassian client, one parse and print of an item's cells, a pure chunk-start decision, a settings table, one plan read and one standing per pick, one config load in chunk-pr, notifier backends in notifier, and the bin regroup filed as item 392

This commit is contained in:
2026-11-16 14:47:46 +01:00
parent 3f7d85c48e
commit f58250d0ce
103 changed files with 1299 additions and 1044 deletions
+4 -4
View File
@@ -7,11 +7,10 @@ from larv_review.plan 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
from plan_store.stores import file_plan, store as plan_store
from larv_review.seats import FIRST_SEATS, scores, seats_file, SeatsFile
from larv_review.scoring import floor_step, means, under_floor
from project_config.main import located
from release_plan import plan_file
from plan_store.stores import store as plan_store
from record_store.stores import RecordStore, store
from larv_review.scoring_setup import removed_setup
@@ -84,10 +83,11 @@ def rerank(home: pathlib.Path, warn: Say) -> Failure | None:
if todo is None:
# A plan in Jira is ranked by Jira's backlog, which no score moves.
return None
ranked = plan_file.rank_file(todo, config)
plan = file_plan(config, todo)
ranked = plan.rank()
if isinstance(ranked, Failure):
return Failure(f"recorded the run, but rank_todo.py cannot rank {todo}: {ranked.reason}. Fix what that names, then run rank_todo.py on {todo}, not record-scoring again")
for line in plan_file.report_lines(todo, ranked):
for line in plan.reported(ranked):
warn(line)
if ranked.under_bar:
return Failure(f"recorded the run and ranked {todo}, but the lines above name items now under the bar. Settle each as its line says, then run rank_todo.py on {todo}, not record-scoring again")
+3 -2
View File
@@ -6,8 +6,9 @@ from review_rules.comprehension_history import entries
from failure import Failure
from git_cli.git_repo import file_at, git
from project_config.main import located
from release_plan.todo_table import NoItemsTable
from plan_store.stores import store as plan_store, PlanStore
from plan.todo_table import NoItemsTable
from plan_store.stores import store as plan_store
from plan_store.plans import PlanStore
from record_store.stores import store
+7 -7
View File
@@ -1,15 +1,15 @@
import pathlib
from release_plan.release_standing import Cut, LastCut, next_release, project_plan, Unknown
from release_plan.release_standing import Cut, LastCut, next_release, project_plan, standing_of, Unknown
from failure import Failure
from larv_review.scoring import is_floor_item
from release_plan.todo_table import Item, NoItemsTable
from plan.todo_table import Item, NoItemsTable
from project_config.main import located
from release_plan.goals_file import OPTED_OUT
from plan_store.stores import Plan, PlanStore
from plan.goals_file import OPTED_OUT
from plan_store.plans import Plan, PlanStore
from plan_store import stores as plan_stores
from project_config.settings import ProjectConfig
from release_plan.release import Release, version
from plan.release import Release, version
from record_store import stores
from larv_review.unmeasured import unmeasured_cut
@@ -49,7 +49,7 @@ def landed_towards(found: list[Item], cut: LastCut) -> Release | None | Failure:
"""The next release on the default branch, once work has landed towards it: once one or more changes are unreleased, as `release_standing.unreleased_changes` counts them. None where there is no next release, or no change is unreleased. found is the default branch's plan."""
if isinstance(cut.tag, Failure):
return Failure(f"could not tell the next release: the default branch's tags cannot be read: {cut.tag.reason}")
upcoming = next_release(found, cut)
upcoming = next_release(standing_of(found, cut), cut)
if isinstance(upcoming, Unknown):
return Failure("could not tell the next release: the default branch's todo.md history cannot be read")
# Cut's release is the last cut's version or earlier, so no work lands towards it.
@@ -86,7 +86,7 @@ def plan_reasons(ref: str, ids: list[int] | None, home: pathlib.Path) -> list[st
if OPTED_OUT.search(decisions):
return []
held = project_plan(config, ref, checkout)
before = held.todo
before = held.plan
read = checkout_plan(plan_stores.store(config))
if isinstance(read, Failure):
return read
+3 -3
View File
@@ -1,8 +1,8 @@
"""The plan as a listing a reviewer reads with the Read tool, whatever store holds the plan."""
from failure import Failure
from release_plan.todo_table import Item
from plan_store.stores import PlanStore
from release_plan.release import version
from plan.todo_table import Item
from plan_store.plans import PlanStore
from plan.release import version
def plan_listing(plan: PlanStore) -> str:
+1 -1
View File
@@ -1,7 +1,7 @@
import decimal
from review_rules.comprehension_history import DIMENSIONS
from release_plan.todo_table import Item
from plan.todo_table import Item
# A floor item's tagline opens with this phrase, which a tagline quoting or mentioning the floor never does; a floor item's chunk runs a scoring run.
FLOOR_ITEM = "Reach the comprehension floor:"
+2 -2
View File
@@ -22,11 +22,11 @@ from larv_review.ruling import counted, ruling, split, surplus, votes
from larv_review.history_commands import decided, rerank
from project_config.settings import DEFAULT_FLOOR
from failure import Failure
from plan_store.stores import FilePlan
from plan_store.todo_md import FilePlan
from record_store.stores import FileStore
from larv_review.scoring import floor_step, means, under_floor
from test_env import isolated_env
from release_plan.todo_table import Item, items, NoItemsTable
from plan.todo_table import Item, items, NoItemsTable
from release_plan.release_standing import LastCut
from larv_review.ruling_base import measured_commit
from record_store.fakes import MemoryStore
+1 -1
View File
@@ -4,7 +4,7 @@ import unittest
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
from plan_store.stores import BLOCKED_BY
from plan.todo_table import BLOCKED_BY
from plan_store.contract import FIRST, SECOND
from plan_store.fakes import MemoryPlan
from larv_review.plan_listing import plan_listing