Compare commits

...

4 Commits

Author SHA1 Message Date
lilleman 41b91e2265 Answer prose round 1: 0 🔴, 0 🟡 (0 misread); clean
CI / tests (pull_request) Successful in 2m10s
2026-11-10 11:18:53 +01:00
lilleman 968f22b5ae Answer stability round 1: 0 🔴, 0 🟡 (0 misread); the 🟢 on a detached-HEAD test predates this change and is declined 2026-11-10 11:18:53 +01:00
lilleman 23381b08eb Answer security round 1: 0 🔴, 0 🟡 (0 misread); clean 2026-11-10 11:18:53 +01:00
lilleman 509804da0d Read the branch's reflog in rule-hook overrides when a path shares its name
CI / tests (pull_request) Successful in 2m11s
2026-11-10 11:17:17 +01:00
5 changed files with 28 additions and 6 deletions
+1
View File
@@ -2,6 +2,7 @@
## Unreleased
- `rule-hook overrides` now lists the chunk's overrides when a file or folder shares the branch's name. It used to exit saying it could not read the reflog.
- `chunk-pr clean` removes a merged chunk's worktree and local branch and fast-forwards the main checkout. It leaves a main checkout with uncommitted files, another branch or commits of its own as it was, and says why.
- `review-replay` now replays each round at the commit with the newest author time at or before the round's time, and takes the clone's base the same way by the time the chunk began. It took the first such commit in log order, so a commit authored early but merged late, such as a dependency bump, could win over the commits the round reviewed.
- The shared goal every project pursues, code health, now asks that code stay easy to read, change safely and debug, tomorrow and after seven years of development.
+1 -1
View File
@@ -95,7 +95,7 @@ def print_overrides(directory: str) -> int:
return 1
found = guarded_git(directory, "branch", "--show-current")
branch = found if isinstance(found, str) and found else "HEAD"
reflog = guarded_git(directory, "reflog", "show", "--format=%H", branch)
reflog = guarded_git(directory, "reflog", "show", "--format=%H", branch, "--")
head = guarded_git(directory, "rev-parse", "HEAD")
unread = unread_reflog(reflog, head)
if unread:
+9
View File
@@ -682,6 +682,15 @@ class Hook(unittest.TestCase):
git(self.repo, "branch", "-m", "renamed")
self.assertIn("\timage-pin\t", self.listed(), "the reflog keeps the amended commit")
def test_a_folder_named_like_the_branch_doesn_t_hide_the_overrides(self):
os.mkdir(f"{self.repo}/chunk")
pathlib.Path(self.repo, "chunk", "notes.md").write_text("x\n", encoding="utf-8")
git(self.repo, "add", "chunk")
git(self.repo, "commit", "-q", "-m", "a folder named like the branch")
content = "# rule-override image-pin: the vendor tags no patch versions\nFROM vendor/tool:2\n"
hook({"cwd": self.repo, "tool_input": {"file_path": f"{self.repo}/Dockerfile", "content": content}, "tool_name": "Write"}, self.repo)
self.assertIn("\timage-pin\t", self.listed())
def test_an_unreadable_reflog_fails_the_listing(self):
unborn = tempfile.mkdtemp()
self.addCleanup(subprocess.run, ["rm", "-rf", unborn])
+17
View File
@@ -1470,3 +1470,20 @@ Read most (opens and searches):
- `bin/review-replay` 1
- `bin/review_replay/rounds.py` 1
- `bin/review_replay/test_review_replay.py` 1
## Reading cost, chunk cd3529c360f1, finished 2026-11-10T10:16:31Z
62832 new input tokens before the first commit.
Read most (opens and searches):
- `README.md` 2
- `bin/chunk_pr/main.py` 2
- `bin/chunk_pr/test_chunk_pr.py` 2
- `skills/larv-review/SKILL.md` 2
- `CLAUDE.md` 1
- `bin/chunk-pr` 1
- `bin/deploy_release/forge.py` 1
- `bin/git_cli/test_git_repo.py` 1
- `bin/test_env.py` 1
- `ci.sh` 1
-5
View File
@@ -14,7 +14,6 @@
|---|---|---|---|---|---|---|---|---|---|---|---|
| 277 | 0.7.0 | | question | **Map the size of the code an item names onto S, on a scale the human picks, and have `score-outcomes` print that S for the item being scored and for each finished item it lists.** | 3 | 2 | 2 | 5 | 4 | 1.1 by 4, 1.4 by 3 | 2.4 |
| 1 | 0.7.0 | | question | **Say in README → Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume.** | 1 | 2 | 1 | 2 | 1 | | 0.0 |
| 290 | 0.7.0 | | defect | **Have `rule-hook overrides` read the branch's reflog when a file or folder shares the branch's name.** | 1 | 2 | 2 | 3 | 1 | 1.1 by 2 | 1.0 |
| 286 | 0.7.0 | | | **Lower the reading cost of the files a chunk reads most before its first commit.** | 3 | 2 | 2 | 5 | 5 | 1.4 by 4 | 1.0 |
| 287 | 0.8.0 | | | **Move the forge helpers `Forge`, `forge_of`, `runner`, `open_pull`, `merged_pull`, `pull_at` and `gitea` into one module that `chunk_preflight`, `chunk_pr`, `deploy_release` and `larv_review` all import from, so no tool imports another tool's internals for them.** | 3 | 1 | 3 | 5 | 5 | code health by 3 | 3.4 |
| 284 | 0.8.0 | | owner | **Script each step that 0.7.0's chunks repeated by hand and a program can compute, filing one item per step, and file this audit again for the next release.** | 1 | 2 | 1 | 2 | 2 | 1.4 by 3, 1.5 by 3 | 2.6 |
@@ -71,10 +70,6 @@ It lives under `~/.claude`, which `.gitignore` keeps from the remote, so a lost
The README line covers the bench's transcripts in `workflow-bench/logs/` too (goal 3).
### 290. Have `rule-hook overrides` read the branch's reflog when a file or folder shares the branch's name.
`bin/rule_hook/override_log.py:98` runs `git reflog show --format=%H <branch>` without a `--` after the branch. When a tracked path has the branch's name, git stops with "ambiguous argument … both revision and filename", and `rule-hook overrides` exits saying it cannot tell which overrides are the chunk's. larv-review's Overrides pass then has no list to judge, so an override in such a chunk would go unreviewed. Found on 2026-11-09 in PR #456, whose branch and new folder were both `reviewer-merge-trials`. Fix by passing `--` after the branch, and test it with a branch named after a tracked folder.
### 286. Lower the reading cost of the files a chunk reads most before its first commit.
`reading-cost` reports Rising: the last five chunks' median is 151,930 new input tokens before the first commit, against 103,215 for the five before them. Those five chunks opened or searched these files most: `todo.md` 42 times, `README.md` 16, `docs/decisions.md` 12, `AGENTS.md` 10, `bin/rank_todo.py` 9, `bin/release_plan/ranking.py` 8, `docs/reading-cost.md` 8, `CHANGELOG.md` 7, `rules/todo-items.md` 7 and `bin/rule_hook/test_rule_hook.py` 6.