From 38c91606d600f8b0db1af4dcec2aadc207753ecf Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 23 Nov 2026 23:21:11 +0100 Subject: [PATCH 01/10] Document a task-bench command for this repo, with an image that holds what its tests need --- .gitignore | 2 ++ README.md | 2 ++ task-bench-image/Dockerfile | 7 +++++++ 3 files changed, 11 insertions(+) create mode 100644 task-bench-image/Dockerfile diff --git a/.gitignore b/.gitignore index a6be36e7..729fb625 100644 --- a/.gitignore +++ b/.gitignore @@ -202,6 +202,8 @@ !stability-skip-count/ !stability-skip-count/README.md !stability-skip-count/count.py +!task-bench-image/ +!task-bench-image/Dockerfile !workflow-bench/ !workflow-bench/advisor-judge-prompt.md !workflow-bench/advisor-run-prompt.md diff --git a/README.md b/README.md index 33958389..1e242470 100644 --- a/README.md +++ b/README.md @@ -293,6 +293,8 @@ CI runs `ci.sh` on every pull request, and `main` doesn't merge anything until i To mutation-test the lines a branch changes, run `~/.claude/bin/run-heavy ~/.claude/bin/mutate-changes --prefix 'uvx --python "$(command -v python3)" --with pytest==9.2.0 --from "mutmut>=3,<4"'` in its checkout. +To bench how hard the code is to fix a bug in, run `docker build --quiet --memory 2g --memory-swap 2g -t claude-config-task-bench task-bench-image && ~/.claude/bin/task-bench --image claude-config-task-bench --test 'python -m pytest -q -p no:cacheprovider -n 4 bin --ignore=bin/adf_codec --ignore=bin/run_tests --ignore=bin/repo_checks/test_types.py --deselect bin/plan/test_touches.py::PredictedTest --deselect bin/loop_effects/test_effects.py::ChildShells'` in its checkout, under `~/.claude/bin/run-heavy`. A scoring run starts this command with `--record-figures`. The bench runs the tests in `task-bench-image/Dockerfile`'s image with no network, so the image holds Python, pytest, pytest-xdist, git and tmux. The test command leaves out what needs docker or `uvx` and the process tests that need an init; run `bin/run-tests` on the host for those. + ## Tracking a new file `.gitignore` is an allowlist. Track a file by negating it and its parent directories, then confirm with `git check-ignore -v `: diff --git a/task-bench-image/Dockerfile b/task-bench-image/Dockerfile new file mode 100644 index 00000000..8490e749 --- /dev/null +++ b/task-bench-image/Dockerfile @@ -0,0 +1,7 @@ +# The image `task-bench` runs this repo's tests in, with no network: README.md → Install documents its command. +# The python tag is ci.sh's; the pytest pins are bin/run_tests/main.py's. git and tmux are what the tests run; Debian's apt holds one version of each per release, so the base's tag pins them. +FROM python:3.14.8 +RUN apt-get update \ + && apt-get install --yes --no-install-recommends git tmux \ + && rm -rf /var/lib/apt/lists/* \ + && pip install --no-cache-dir pytest==9.2.0 pytest-xdist==3.8.0 -- 2.52.0 From 307b7d3c04e1a11f4828cfb659475e9b3b6a398f Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 23 Nov 2026 23:21:22 +0100 Subject: [PATCH 02/10] Record the reading cost of item 529's chunk --- docs/reading-cost.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 91f2b06f..e3d29537 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -3508,3 +3508,16 @@ Read most (opens and searches): - `bin/task_bench/runs.py` 1 - `bin/task_bench/tasks.py` 1 - `docs/score-anchors.md` 1 + +## Reading cost, chunk 33264f8a9040, finished 2026-11-23T22:13:25Z + +64108 new input tokens before the first commit. + +Read most (opens and searches): + +- `README.md` 3 +- `docs/decisions.md` 3 +- `skills/larv-review/SKILL.md` 3 +- `bin/task_bench/main.py` 2 +- `CHANGELOG.md` 1 +- `todo.md` 1 -- 2.52.0 From 81e03f2a6db749a8d727fe2a211b9300954c15cd Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 23 Nov 2026 23:21:45 +0100 Subject: [PATCH 03/10] =?UTF-8?q?Answer=20security=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread);=20no=20findin?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From ca99ed3ef5e0032af959811425ae5bb5d84a9a03 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 23 Nov 2026 23:29:40 +0100 Subject: [PATCH 04/10] Pin the bench image's Python and pytest to what CI uses, and give its command a mutmut prefix and its own build step --- README.md | 2 +- bin/repo_checks/test_task_bench_image.py | 24 ++++++++++++++++++++++++ bin/run_tests/main.py | 2 +- task-bench-image/Dockerfile | 3 +-- 4 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 bin/repo_checks/test_task_bench_image.py diff --git a/README.md b/README.md index 1e242470..897ab18c 100644 --- a/README.md +++ b/README.md @@ -293,7 +293,7 @@ CI runs `ci.sh` on every pull request, and `main` doesn't merge anything until i To mutation-test the lines a branch changes, run `~/.claude/bin/run-heavy ~/.claude/bin/mutate-changes --prefix 'uvx --python "$(command -v python3)" --with pytest==9.2.0 --from "mutmut>=3,<4"'` in its checkout. -To bench how hard the code is to fix a bug in, run `docker build --quiet --memory 2g --memory-swap 2g -t claude-config-task-bench task-bench-image && ~/.claude/bin/task-bench --image claude-config-task-bench --test 'python -m pytest -q -p no:cacheprovider -n 4 bin --ignore=bin/adf_codec --ignore=bin/run_tests --ignore=bin/repo_checks/test_types.py --deselect bin/plan/test_touches.py::PredictedTest --deselect bin/loop_effects/test_effects.py::ChildShells'` in its checkout, under `~/.claude/bin/run-heavy`. A scoring run starts this command with `--record-figures`. The bench runs the tests in `task-bench-image/Dockerfile`'s image with no network, so the image holds Python, pytest, pytest-xdist, git and tmux. The test command leaves out what needs docker or `uvx` and the process tests that need an init; run `bin/run-tests` on the host for those. +To bench how hard the code is to fix a bug in, build the image first, with `~/.claude/bin/run-heavy docker build --quiet --memory 2g --memory-swap 2g -t claude-config-task-bench task-bench-image`. Then run `~/.claude/bin/task-bench --image claude-config-task-bench --prefix 'uvx --python "$(command -v python3)" --with pytest==9.2.0 --from "mutmut>=3,<4"' --test 'python -m pytest -q -p no:cacheprovider -n 4 bin --ignore=bin/adf_codec --ignore=bin/run_tests --ignore=bin/repo_checks/test_types.py --deselect bin/plan/test_touches.py::PredictedTest --deselect bin/loop_effects/test_effects.py::ChildShells'` in this checkout, under `~/.claude/bin/run-heavy`. A scoring run starts it with `--record-figures` added. The bench runs the tests with no network, so the image holds everything they need. The `--test` leaves out the tests that need docker or `uvx`, and `ChildShells`, which needs `docker run --init` to reap its processes: `bin/run-tests` on the host runs those. ## Tracking a new file diff --git a/bin/repo_checks/test_task_bench_image.py b/bin/repo_checks/test_task_bench_image.py new file mode 100644 index 00000000..b8e93df4 --- /dev/null +++ b/bin/repo_checks/test_task_bench_image.py @@ -0,0 +1,24 @@ +import pathlib +import re +import sys +import unittest + +sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) + +from repo_checks import ROOT +from run_tests.main import PYTEST + +DOCKERFILE = (ROOT / "task-bench-image" / "Dockerfile").read_text(encoding="utf-8") + + +class TaskBenchImage(unittest.TestCase): + def test_the_image_has_the_python_tag_that_ci_sh_runs(self): + images = re.findall(r"^FROM (python:\S+)$", DOCKERFILE, re.MULTILINE) + self.assertEqual(len(images), 1, "task-bench-image/Dockerfile starts from one python image") + # ci.sh prints its Dockerfile with printf, so the line ends in a backslash and an n. + self.assertIn(f"FROM {images[0]}\\n", (ROOT / "ci.sh").read_text(encoding="utf-8")) + + def test_the_image_installs_the_pytest_pins_that_run_tests_uses(self): + installed = set(re.findall(r"\b(pytest(?:-xdist)?==[\d.]+)", DOCKERFILE)) + pins = {word for word in PYTEST if re.fullmatch(r"pytest(?:-xdist)?==[\d.]+", word)} + self.assertEqual(installed, pins) diff --git a/bin/run_tests/main.py b/bin/run_tests/main.py index c339649a..c19420ff 100644 --- a/bin/run_tests/main.py +++ b/bin/run_tests/main.py @@ -22,7 +22,7 @@ import typing from machine_load.slots import CPUS_PER_SLOT BIN = pathlib.Path(__file__).resolve().parents[1] -# ci.sh runs this command, so its pins live here; README.md → Test's mutation command repeats the pytest pin, so change both. The workers fill one heavy slot, since run-heavy grants one. +# ci.sh runs this command, so its pins live here; README.md → Test's mutation command and task-bench-image/Dockerfile repeat the pytest pins, so change all three. The workers fill one heavy slot, since run-heavy grants one. PYTEST = ["uvx", "--python", shutil.which("python3") or sys.executable, "--with", "pytest-xdist==3.8.0", "pytest==9.2.0", "-n", str(CPUS_PER_SLOT)] SECTION = re.compile(r"^=+ (.+) =+$") TEST_HEADER = re.compile(r"^_+ .+ _+$") diff --git a/task-bench-image/Dockerfile b/task-bench-image/Dockerfile index 8490e749..6e78bb2d 100644 --- a/task-bench-image/Dockerfile +++ b/task-bench-image/Dockerfile @@ -1,5 +1,4 @@ -# The image `task-bench` runs this repo's tests in, with no network: README.md → Install documents its command. -# The python tag is ci.sh's; the pytest pins are bin/run_tests/main.py's. git and tmux are what the tests run; Debian's apt holds one version of each per release, so the base's tag pins them. +# The python tag is ci.sh's, and the pytest pins are bin/run_tests/main.py's; bin/repo_checks/test_task_bench_image.py holds them equal. git and tmux come from Debian's current apt: the tests need no exact version. FROM python:3.14.8 RUN apt-get update \ && apt-get install --yes --no-install-recommends git tmux \ -- 2.52.0 From b0258ef736db569fb46850d88d876d04e7ecd21b Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 23 Nov 2026 23:31:55 +0100 Subject: [PATCH 05/10] Sort the new check's imports --- bin/repo_checks/test_task_bench_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/repo_checks/test_task_bench_image.py b/bin/repo_checks/test_task_bench_image.py index b8e93df4..19f750f2 100644 --- a/bin/repo_checks/test_task_bench_image.py +++ b/bin/repo_checks/test_task_bench_image.py @@ -5,8 +5,8 @@ import unittest sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) -from repo_checks import ROOT from run_tests.main import PYTEST +from repo_checks import ROOT DOCKERFILE = (ROOT / "task-bench-image" / "Dockerfile").read_text(encoding="utf-8") -- 2.52.0 From 461f1a6ef16c7db292648aa8d4b88bfd0de6b9e8 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 23 Nov 2026 23:32:00 +0100 Subject: [PATCH 06/10] =?UTF-8?q?Answer=20stability=20round=201:=201=20?= =?UTF-8?q?=F0=9F=94=B4,=203=20=F0=9F=9F=A1=20(0=20misread);=20the=20READM?= =?UTF-8?q?E=20command=20gets=20a=20mutmut=20--prefix=20and=20its=20own=20?= =?UTF-8?q?build=20step,=20the=20Dockerfile=20and=20run-tests'=20comments?= =?UTF-8?q?=20name=20each=20other's=20pins,=20and=20a=20repo=20check=20hol?= =?UTF-8?q?ds=20them=20equal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From 774f1275344f78c76b8b9ba497062ed122f869b9 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 23 Nov 2026 23:32:00 +0100 Subject: [PATCH 07/10] =?UTF-8?q?Answer=20product-owner=20round=201:=200?= =?UTF-8?q?=20=F0=9F=94=B4,=202=20=F0=9F=9F=A1=20(0=20misread);=20the=20--?= =?UTF-8?q?prefix=20and=20the=20build=20step=20are=20in=20the=20commit=20b?= =?UTF-8?q?efore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From a4ff7de7292ab1c9efa14fee93fac67fa59bbdcc Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 23 Nov 2026 23:32:00 +0100 Subject: [PATCH 08/10] =?UTF-8?q?Answer=20prose=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=203=20=F0=9F=9F=A1=20(0=20misread);=20the=20Docke?= =?UTF-8?q?rfile=20comment=20and=20the=20README=20paragraph=20are=20rewrit?= =?UTF-8?q?ten=20in=20the=20commit=20before?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From 38581b98be6a73994e6e4c84c84b1be36759a57e Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 23 Nov 2026 23:33:35 +0100 Subject: [PATCH 09/10] =?UTF-8?q?Answer=20stability=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20the=20repo?= =?UTF-8?q?=20check=20holds=20the=20README's=20pytest=20pins=20too,=20and?= =?UTF-8?q?=20run-tests'=20comment=20names=20it=20instead=20of=20counting?= =?UTF-8?q?=20copies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/repo_checks/test_task_bench_image.py | 4 ++++ bin/run_tests/main.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/repo_checks/test_task_bench_image.py b/bin/repo_checks/test_task_bench_image.py index 19f750f2..07cadb6d 100644 --- a/bin/repo_checks/test_task_bench_image.py +++ b/bin/repo_checks/test_task_bench_image.py @@ -22,3 +22,7 @@ class TaskBenchImage(unittest.TestCase): installed = set(re.findall(r"\b(pytest(?:-xdist)?==[\d.]+)", DOCKERFILE)) pins = {word for word in PYTEST if re.fullmatch(r"pytest(?:-xdist)?==[\d.]+", word)} self.assertEqual(installed, pins) + + def test_each_pytest_pin_in_the_readme_is_the_one_run_tests_uses(self): + pinned = {word for word in PYTEST if re.fullmatch(r"pytest==[\d.]+", word)} + self.assertEqual(set(re.findall(r"\bpytest==[\d.]+", (ROOT / "README.md").read_text(encoding="utf-8"))), pinned) diff --git a/bin/run_tests/main.py b/bin/run_tests/main.py index c19420ff..b60a5271 100644 --- a/bin/run_tests/main.py +++ b/bin/run_tests/main.py @@ -22,7 +22,7 @@ import typing from machine_load.slots import CPUS_PER_SLOT BIN = pathlib.Path(__file__).resolve().parents[1] -# ci.sh runs this command, so its pins live here; README.md → Test's mutation command and task-bench-image/Dockerfile repeat the pytest pins, so change all three. The workers fill one heavy slot, since run-heavy grants one. +# ci.sh runs this command, so its pins live here; README.md → Test's mutation and bench commands and task-bench-image/Dockerfile repeat the pytest pins, and bin/repo_checks/test_task_bench_image.py fails where one differs. The workers fill one heavy slot, since run-heavy grants one. PYTEST = ["uvx", "--python", shutil.which("python3") or sys.executable, "--with", "pytest-xdist==3.8.0", "pytest==9.2.0", "-n", str(CPUS_PER_SLOT)] SECTION = re.compile(r"^=+ (.+) =+$") TEST_HEADER = re.compile(r"^_+ .+ _+$") -- 2.52.0 From 5739a308b20df5bd7a5d1346b4a73c6cc26c071c Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 23 Nov 2026 23:35:58 +0100 Subject: [PATCH 10/10] Finish item 529 in the plan --- CHANGELOG.md | 1 + todo.md | 9 --------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1eed6db3..351cc4be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- This repo documents its own `task-bench` command in the README → Test, with `task-bench-image/Dockerfile`, an image that holds pytest, git and tmux, so each scoring run in `larv-review` benches claude-config and records its figures. - The stability reviewer now checks a lookup key built by joining path segments, or matched by prefix, for two inputs that give one key, such as a column named like its own table or the namespaces `ns` and `ns.sub`. - The release review now goes over a project's bench features: it reapplies each reference patch and rewrites one that no longer applies, deletes a feature that no longer breaks a goal, and adds features until each place the comprehension seats find hardest has one. - `task-bench` plants bugs in Python files too, from the mutants mutmut 3 kills, and tells Haiku the error pytest prints. Where the seats' places name both Go and Python files, one `--prefix` runs both tools; `task-bench --help` shows one. diff --git a/todo.md b/todo.md index 0627101c..cdcfe0da 100644 --- a/todo.md +++ b/todo.md @@ -16,7 +16,6 @@ | ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score | |---|---|---|---|---|---|---|---|---|---|---|---| -| 529 | 0.16.0 | | owner | **Document a `task-bench` command for this repo in the README, with an image that holds what its tests need, so each scoring run benches it.** | 2 | 2 | 1 | 3 | 3 | 1.1 by 2 | 0.7 | | 507 | 0.16.0 | | owner | **Bench rebuilding a feature the project shipped: revert its commit at the head, hand Haiku its item tagline, and check with the tests that commit added.** | 3 | 2 | 1 | 4 | 5 | 1.1 by 3 | 0.7 | | 524 | 0.16.0 | | owner | **Write fejkdata's first six bench features, each a spec, acceptance tests in Go and a reference patch that builds it, in the `bench-tasks` folder its config names.** | 3 | 2 | 1 | 4 | 6 | 1.1 by 3 | 0.5 | | 530 | 0.16.0 | | owner | **Plant a mutant in a Python file whose lines end in CRLF.** | 1 | 1 | 1 | 1 | 2 | 1.1 by 1 | 0.4 | @@ -114,14 +113,6 @@ ## Details -### 529. Document a `task-bench` command for this repo in the README, with an image that holds what its tests need, so each scoring run benches it. - -The bench runs the tests in an image without network, and this repo's tests run on the host through `uvx`, so no image holds pytest, git and tmux today. Build one, pinned, and name it in the command. A scoring run starts the bench the README documents, so from then on each one spends Haiku runs. - -Touches: -- `README.md` -- `task-bench-image/Dockerfile` - ### 507. Bench rebuilding a feature the project shipped: revert its commit at the head, hand Haiku its item tagline, and check with the tests that commit added. Such tasks cost nothing to write and are realistic. A commit whose revert doesn't apply cleanly at both the base and the head is skipped. -- 2.52.0