Answer stability round 1: ship item 83 out of the plan, test both scores-file refusals, mark a pass past the cap and only a pass, say how to retry a refused scores file, and sort the allowlist and mypy's modules
This commit is contained in:
+14
-7
@@ -5,7 +5,7 @@ usage: larv-review ruling-base | round-count | needs-scoring-run [<item ID>...]
|
||||
The comprehension check keeps a project from reading worse, two ways. In a paired ruling, seats read
|
||||
the branch's head beside a base and vote better, same or worse, overall and on each dimension; a
|
||||
worse ruling blocks the merge, which is the ratchet. In a scoring run, four seats score the project
|
||||
from 1 to 10; a mean under the floor of {floor} blocks the merge.
|
||||
from 1 to 10; a mean under the floor of {floor} blocks the merge, unless you decide to ship.
|
||||
|
||||
Run it inside a project checkout or one of its worktrees. Each command but record-ruling first
|
||||
fetches origin, when the checkout has that remote, and takes origin's default branch, or else the
|
||||
@@ -19,10 +19,10 @@ history, or whose last added paired ruling, by heading time, is better; a merge
|
||||
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.
|
||||
|
||||
round-count prints each pass's count from the titles, ignoring case, of commits the default branch
|
||||
does not hold that open `Answer <pass> round <n>:`: the highest <n>, or the number of such commits
|
||||
where that is more. It marks each pass at the cap of {cap} rounds, telling you to ask the human
|
||||
before another round, and each name in such a title that is not a pass.
|
||||
round-count counts, for each pass, the commits not yet on the default branch whose titles open
|
||||
`Answer <pass> round <n>:`, in any case: the highest <n>, or the number of such commits where that
|
||||
is more. It marks a pass at or past the cap of {cap} rounds, telling you to ask the human before
|
||||
another round, and 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
|
||||
@@ -77,7 +77,8 @@ time and the seats file's first line. Each commit that line names must be in the
|
||||
when the history already holds an entry on what that line reads.
|
||||
|
||||
Exit 1, saying why, on unknown arguments, an unknown item ID, a seats file it cannot read or that
|
||||
breaks the shape above, or when git cannot start, finds no checkout or no default branch, cannot
|
||||
breaks the shape above, a scores file record-ruling did not call for or one naming another commit,
|
||||
or when git cannot start, finds no checkout or no default branch, cannot
|
||||
fetch origin for ruling-base, needs-scoring-run or record-scoring, or cannot read or write the history or todo.md.
|
||||
"""
|
||||
import pathlib
|
||||
@@ -160,10 +161,16 @@ def round_count(default: str) -> Failure | None:
|
||||
if isinstance(titles, Failure):
|
||||
return titles
|
||||
for name, count in round_counts(titles.splitlines()).items():
|
||||
print(f"{name}: {count}{', at the cap: ask the human before another round' if count >= CAP else ''}{'' if name in PASSES else ', not a pass: check the commit title'}")
|
||||
print(f"{name}: {count}{cap_note(count) if name in PASSES else ', not a pass: check the commit title'}")
|
||||
return None
|
||||
|
||||
|
||||
def cap_note(count: int) -> str:
|
||||
if count < CAP:
|
||||
return ""
|
||||
return f", {'at' if count == CAP else 'past'} the cap: ask the human before another round"
|
||||
|
||||
|
||||
def needs_scoring_run(default: str, ids: list[int]) -> Failure | None:
|
||||
reasons = plan_reasons(default, ids)
|
||||
if isinstance(reasons, Failure):
|
||||
|
||||
Reference in New Issue
Block a user