Answer architecture round 1: 1 🔴, 6 🟡; feed later rulings' worse places to places, base each ruling on the last entry, merge origin before the gate, test a second record, and drop stale ratchet wording

This commit is contained in:
2026-10-13 12:28:18 +02:00
parent 459df0a7cc
commit 79cf337936
13 changed files with 131 additions and 108 deletions
+11 -15
View File
@@ -14,10 +14,9 @@ last fetched and says so on stderr; the other three exit 1. The history is
docs/comprehension-history.md in the checkout.
ruling-base prints the commit a paired ruling reads against, then which of these found it. The last
measured commit is the default branch's newest merged change that adds a scoring run to the
history, or whose last added paired ruling, by heading time, is better; a merge commit counts as
one change against its first parent. With none, the base is the one the history's first paired
ruling names; with no ruling either, it is the merge base of HEAD and the default branch.
measured commit is the default branch's newest merged change that adds a paired ruling or a scoring
run to the history; a merge commit counts as one change against its first parent. With none, it is
the merge base of HEAD and the default branch.
round-count prints each pass's round count among the commits not yet on the default branch whose
titles open `Answer <pass> round <n>:`, ignoring case. The count is the highest <n>, or the number of
@@ -68,9 +67,10 @@ paired ruling's base. It appends the seats' scores and their means, rounded half
decimals, prints the means and, when a mean is under the floor of {floor}, a line opening `Floor:`
naming each one.
places prints the places the seats named in the history's newest entry, by its time, that scored
the project: a scoring run, or a ruling recorded before this tool stopped calling the scoring seats
on a fallen dimension.
places prints the places seats found hard since the history's newest entry, by time, that holds
scoring seats' places: all of that entry's, then, from each later paired ruling, each place that
opens with a dimension, or Overall, its seat's vote counted as worse. Each entry's places come under
its heading, oldest first. With no such entry, it reads every ruling.
Each record is appended to the history, created when missing, under a heading of the current UTC
time and the seats file's first line. Each commit that line names must be in the checkout. It exits 1
@@ -85,13 +85,12 @@ import re
import sys
import typing
from larv_review.ruling_base import base
from round_titles import CAP, PASSES, round_counts
from git_repo import default_branch, file_at, git
from git_repo import default_branch, git
from failure import Failure
from larv_review.scoring import FLOOR
from comprehension_history import HISTORY
from larv_review.git import history_changes
from larv_review.ruling_base import measured_commit
from larv_review.plan import plan_reasons
from larv_review.record import record_ruling, record_scoring, show_places
@@ -145,11 +144,8 @@ def show_ruling_base(default: str) -> Failure | None:
changes = history_changes(default)
if isinstance(changes, Failure):
return changes
history = file_at(default, HISTORY)
if isinstance(history, Failure):
return history
if found := base(changes, history):
print("\n".join(found))
if found := measured_commit(changes):
print(f"{found}\nthe last measured commit")
return None
merge_base = git("merge-base", "HEAD", default)
if isinstance(merge_base, Failure):