From 87f41071f2bac339aa713156af937b63b8379e6e Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 22 Oct 2026 19:50:09 +0200 Subject: [PATCH] =?UTF-8?q?Answer=20principles=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=206=20=F0=9F=9F=A1;=20cut=20the=20false=20status-?= =?UTF-8?q?line=20exception,=20split=20the=20branch=20test,=20and=20date?= =?UTF-8?q?=20the=20lowest-dimension=20rule=20without=20Shape's=20score?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/git_repo.py | 2 +- bin/metric_bench/main.py | 2 +- bin/test_statusline.py | 21 +++++++++++++-------- docs/decisions.md | 4 ++-- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/bin/git_repo.py b/bin/git_repo.py index b8a53b3d..1587140a 100644 --- a/bin/git_repo.py +++ b/bin/git_repo.py @@ -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 diff --git a/bin/metric_bench/main.py b/bin/metric_bench/main.py index 631ca7b6..a0db6dce 100644 --- a/bin/metric_bench/main.py +++ b/bin/metric_bench/main.py @@ -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 diff --git a/bin/test_statusline.py b/bin/test_statusline.py index e2ae57b1..3d99af01 100644 --- a/bin/test_statusline.py +++ b/bin/test_statusline.py @@ -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}", "")) diff --git a/docs/decisions.md b/docs/decisions.md index d0e4bb8a..fff433b9 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -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