Answer principles round 1: 0 🔴, 6 🟡; cut the false status-line exception, split the branch test, and date the lowest-dimension rule without Shape's score

This commit is contained in:
2026-10-22 19:50:09 +02:00
parent 2fefab6b2e
commit 87f41071f2
4 changed files with 17 additions and 12 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
"""Run git, in the current directory or a given one, and read the checkout, its default branch and its files."""
"""Run git, in the current directory or a given one, as the one place in bin/ that starts it, and read the checkout, its default branch and its files."""
import os
import re
import subprocess
+1 -1
View File
@@ -111,7 +111,7 @@ def noted(notes: list[str]) -> str:
def run_scores(run: Entry, top: str) -> tuple[RunScores | None, list[str]] | Failure:
"""The run's scores, and why each file left out was: git could not show it as UTF-8, or it does not parse."""
# A tracked name that is not UTF-8 fails the run rather than reading with its bytes replaced: every tool in bin/ but the status line, item 204's, reads git's output through git_repo.git's one contract.
# A tracked name that is not UTF-8 fails the run rather than reading with its bytes replaced: every tool in bin/ reads git's output through git_repo.git's one contract.
listed = git("ls-tree", "-r", "-z", "--name-only", run.commit, cwd=top)
if isinstance(listed, Failure):
return listed
+13 -8
View File
@@ -103,11 +103,16 @@ class Script(unittest.TestCase):
ran = self.run_script(stdin)
self.assertEqual((ran.returncode, ran.stdout, ran.stderr), (0, f"{RED}warning: statusline.py's input is not a JSON object{RESET}", ""))
def test_shows_no_branch_where_git_fails(self):
# git_repo.git fails on text that is not UTF-8, so a branch named f\xe5 shows as none.
for branch, shown in ((b"trunk", "trunk"), (b"f\xe5", None)):
with tempfile.TemporaryDirectory() as checkout:
subprocess.run([b"git", b"init", b"-q", b"-b", branch, checkout.encode()], check=True)
ran = self.run_script(json.dumps({"cwd": checkout}))
row = [f"{CYAN}{checkout}{RESET}"] + ([] if shown is None else [f"{DIM}{shown}{RESET}"])
self.assertEqual((ran.stdout, ran.stderr), (SEP.join(row), ""))
def run_on_branch(self, branch):
with tempfile.TemporaryDirectory() as checkout:
subprocess.run([b"git", b"init", b"-q", b"-b", branch, checkout.encode()], check=True)
ran = self.run_script(json.dumps({"cwd": checkout}))
return ran, checkout
def test_shows_the_branch(self):
ran, checkout = self.run_on_branch(b"trunk")
self.assertEqual((ran.stdout, ran.stderr), (SEP.join([f"{CYAN}{checkout}{RESET}", f"{DIM}trunk{RESET}"]), ""))
def test_shows_no_branch_where_git_fails_on_a_name_that_is_not_utf_8(self):
ran, checkout = self.run_on_branch(b"f\xe5")
self.assertEqual((ran.stdout, ran.stderr), (f"{CYAN}{checkout}{RESET}", ""))
+2 -2
View File
@@ -4,9 +4,9 @@
2026-09-20, lilleman. Serves goal 1. Across six projects scored with the four seats, Locality or Self-sufficiency was the lowest dimension at every seat and Navigation at none, so a layout fix would not lift a project under the floor. Valid while the scoring run keeps those four seats.
2026-10-15, lilleman: the lowest dimension caps the overall, so lifting it is worth the most to the floor. PR #257's scoring run found Shape lowest, at 6.25. The Shape items left are `todo.md` items 124 and 125.
2026-10-15, lilleman: the lowest dimension caps the overall, so lifting it is worth the most to the floor.
2026-10-16, PR #283: an item that lifts the lowest dimension moves each goal it cites by 9. lilleman, answering that PR's review: such items compete with the others like any item, so they don't rank first.
2026-10-16, PR #283: an item that lifts the lowest dimension moves each goal it cites by 9. lilleman, answering that PR's review: such items compete with the others like any item, so they don't rank first in the plan.
## loop-claude: a judge decides each interrupt and each quoted answer from the transcript, the README's premises, `AGENTS.md`, `docs/decisions.md`, `~/.claude/CLAUDE.md`, `~/.claude/rules/` and larv-review's standards, and holds a chunk open while an answer the human typed in it is recorded nowhere; the worker's own account of which goal settles a choice decides nothing