Answer review: keep Rust test modules for bugs only, order imports, reword
CI / tests (pull_request) Has been cancelled

This commit is contained in:
2026-11-26 01:30:46 +01:00
parent 347368040e
commit cecabf324a
6 changed files with 49 additions and 33 deletions
+8 -4
View File
@@ -30,8 +30,11 @@ No model judges anything: the bench runs programs, and reads Haiku's own stream.
reaches api.anthropic.com and nothing else. A fix ends after 30 minutes.
- Check. The test command runs over the planted tree with each file that is no test as Haiku left it; a fix passes where it exits 0.
A test Haiku changed, removed or added doesn't count, and neither does a file under a `testdata` folder. In a Rust file, each
inline `#[cfg(test)]` module stands as the planted file has it, and the rest is as Haiku left it. A Rust mutant is passed over
where its file's modules cannot be told apart, as where two share a name or a brace, string or comment is never closed.
inline `#[cfg(test)]` module stands as the planted file has it, and the rest is as Haiku left it. Where Haiku's file lacks one of
those modules, or its modules cannot be told apart, the planted file stands whole; where the planted file's cannot be told apart,
Haiku's stands. A Rust mutant whose file's modules cannot be told apart, as where two share a name or a brace, string or comment
is never closed, is passed over. A Rust test in a file of its own, as `#[cfg(test)] mod tests;` names, counts, since the bench
tells no such file from code.
--image is the project's development image, such as golang:1.27.4. The bench adds Claude Code to it, as its installer installs it,
so the image needs curl and bash; the result names the version. Haiku works in that image. So does --test: sh runs that text at
@@ -68,7 +71,8 @@ project's config names as `bench-tasks`, in the order of their names. Each holds
A feature counts where, at the base and at the head, the test command fails with the acceptance tests in the tree, and passes
once the reference patch is applied too. The bench passes over any other feature, and the report says which and why. Haiku
works in a copy of the side's tree without the `bench-tasks` folder. A build passes where the test command exits 0 over the
side's tree with each file that is no test as Haiku left it, and the acceptance tests put over that. The reference patch is
side's tree with each file that is no test as Haiku left it, a Rust file's test modules included, and the acceptance tests put
over that. The reference patch is
checked the same way, so a test or a `testdata` file it adds doesn't count either. Keep the folder where the project's own test
command doesn't find the acceptance tests, which fail by design: outside the checkout, or in a folder the test runner skips, as Go
skips `testdata`. The table then has a row per feature and side, and `-` for the reads. No mutation tool
@@ -174,7 +178,6 @@ import uuid
from task_bench.tasks import Asked, Bench, BUG, check_made, committed, Kind, KINDS, on_disk, Planned, SHIPPED, Task, tests_in_copy
from task_bench.planted_mutant import bug_at_sides, Mutant
from task_bench.rust_test_modules import tells_apart
from claude_code.reply import Claude
from task_bench.bench_folder import clear_left, held
from task_bench.runs import closed, Containers, docker_cli, fix_attempted, MEMORY_MIB, opened, ran_tests, TimedOut, TOKEN, WORK
@@ -194,6 +197,7 @@ from larv_review.history_commands import read_places
from task_bench.shipped_features import read_shipped, shipped_tasks, ShippedFeatures
from task_bench.record_figures import recorded_bench
from run_heavy.capped_docker import SHARE_VARIABLE
from task_bench.rust_test_modules import tells_apart
USAGE = "usage: task-bench --image <image> --test <shell text> [--base <ref>] [--head <ref>] [--prefix <shell text>] [--seed <n>] [--bugs <n>] [--runs <n>] [--record-figures], or task-bench --tasks features|data-sources --image <image> --test <shell text> [--base <ref>] [--head <ref>] [--runs <n>] [--record-figures], or task-bench --tasks shipped-features --image <image> --test <shell text> [--base <ref>] [--head <ref>] [--shipped <n>] [--runs <n>] [--record-figures], or task-bench gather"
# A panel of three readers, seated as the README's audience, picked these options on 2026-11-21, each 3 to 0.