Document a task-bench command for this repo, with an image that holds what its tests need

This commit is contained in:
2026-11-23 23:21:11 +01:00
parent fb3e526989
commit 38c91606d6
3 changed files with 11 additions and 0 deletions
+2
View File
@@ -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
+2
View File
@@ -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 <path>`:
+7
View File
@@ -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