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