Answer architecture round 2: 0 🔴, 1 🟡 (0 misread); move task_bench's shared Side and Rust test-module scanner to the package top, rename figures.py to run_figures.py, check for cycles between a package's parts, and move REVIEW_LABEL into the backend protocol
CI / tests (pull_request) Successful in 5m13s

This commit is contained in:
2026-11-27 11:36:37 +01:00
parent b563a597f1
commit 7c7d43023b
23 changed files with 84 additions and 45 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
import re
import typing
from task_bench.figures.figures import Side
from task_bench.tasks import Side
HUNK = re.compile(r"^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@", re.MULTILINE)
+1 -2
View File
@@ -10,14 +10,13 @@ import pathlib
import shutil
import typing
from task_bench.tasks import Bench, check_made, committed, DATA_SOURCE, FEATURE, Kind, on_disk, Planned, Task
from task_bench.tasks import Bench, check_made, committed, DATA_SOURCE, FEATURE, Kind, on_disk, Planned, Side, SIDES, Task
from project_config.settings import BENCH_TASKS, CONFIG
from failure import Failure
from task_bench.features.registers import GENERATE, NotGenerated, registered_trees
from project_config.main import located
from mutate_changes.tool_process import Ran
from task_bench.runs import ran_tests, TimedOut
from task_bench.figures.figures import Side, SIDES
SPEC = "spec.md"
PATCH = "reference.patch"
+1 -2
View File
@@ -5,10 +5,9 @@ import os
import pathlib
import shutil
from task_bench.tasks import Bench, committed, on_disk
from task_bench.tasks import Bench, committed, on_disk, Side, SIDES
from task_bench.runs import Containers, entries, in_tree, NotStarted, run_in_image, TimedOut
from failure import Failure
from task_bench.figures.figures import Side, SIDES
# A panel of three readers, seated as the README's audience, picked the name on 2026-11-23: each had it first or second, over
# `register`, which reads as a data file, and `generate-source`, which two read as generating source code.
+1 -2
View File
@@ -10,7 +10,7 @@ import shutil
import typing
from task_bench.features.feature_tasks import ACCEPTANCE, Feature, PATCH, why_passed_over
from task_bench.tasks import Bench, committed, on_disk, Planned, Task
from task_bench.tasks import Bench, committed, on_disk, Planned, Side, SIDES, Task
from branch_chunks.read import cut_with_shipped, unsupported
from failure import Failure
from git_cli.git_repo import Git
@@ -18,7 +18,6 @@ from plan.todo_table import Item, tagline_text
from project_config.main import located
from task_bench.runs import of_tests
from project_config.settings import RECORDS
from task_bench.figures.figures import Side, SIDES
# Why a feature that landed by fast-forward is passed over: no earlier chunk says where its commits start, or its branch merged
# the default branch into itself, so its commits hold what other features built.
+1 -1
View File
@@ -8,7 +8,7 @@ import typing
from claude_code.entries import AssistantTurn, Entry, Text, tool_calls, ToolCall, ToolResult, ToolResults
from task_bench.runs import HOME, WORK
from reading_cost.measure import reads_of
from task_bench.figures.figures import Side
from task_bench.tasks import Side
# A trace keeps the first TEXT_LINES lines of the model's text between two calls, and the first TEXT_WIDTH characters of each.
TEXT_LINES = 3
+2 -2
View File
@@ -15,10 +15,10 @@ from text_files.utc_stamp import utc
# The digest's line that names the commits, as task_bench.digest.digest writes it.
SIDES = re.compile(r"^Base ([0-9a-f]{7,40}), head ([0-9a-f]{7,40})\.", re.M)
# How the table's three rows over every task open, as task_bench.figures.figures.table writes them: the base, the head and the head's change.
# How the table's three rows over every task open, as task_bench.figures.run_figures.table writes them: the base, the head and the head's change.
OVER_ALL = "| All |"
COMMIT_LENGTH = 8
# What a bench's name says its tasks are, by how its table's header opens, as task_bench.figures.figures.table writes it. A bench of
# What a bench's name says its tasks are, by how its table's header opens, as task_bench.figures.run_figures.table writes it. A bench of
# bugs has the bare name.
TASKS_NAMED = {f"| {kind.noun.capitalize()} |": f" {tasks}" for tasks, kind in KINDS.items() if kind is not BUG}
@@ -7,13 +7,11 @@ from claude_code.entries import Entry, entry_from, tool_calls, ToolCall
from failure import Failure
from task_bench.runs import HOME, WORK
from reading_cost.measure import reads_of
from task_bench.tasks import Side, SIDES
from claude_code.tokens import Tokens, tokens_of
# The tools that read or search without a shell. A Bash call counts where `reads_of` finds a file it reads.
READING_TOOLS = frozenset({"Glob", "Grep", "Read"})
# A bench's two sides: the commit before the change and the one after it.
Side = typing.Literal["base", "head"]
SIDES: tuple[Side, Side] = ("base", "head")
@dataclasses.dataclass(frozen=True)
@@ -6,9 +6,9 @@ import unittest
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[2]))
from task_bench.figures import figures as bench_figures
from task_bench.figures import run_figures as bench_figures
from failure import Failure
from task_bench.figures.figures import Figures, Result, table
from task_bench.figures.run_figures import Figures, Result, table
from claude_code.entries import json_objects
from claude_code.tokens import Tokens
+3 -3
View File
@@ -196,7 +196,7 @@ import time
import typing
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.tasks import Asked, Bench, BUG, check_made, committed, Kind, KINDS, on_disk, Planned, SHIPPED, Side, SIDES, Task, tests_in_copy
from task_bench.bugs.planted_mutant import bug_at_sides, Mutant
from claude_code.reply import Claude
from task_bench.bench_folder import clear_left, held
@@ -210,14 +210,14 @@ from claude_code.entries import entry_from, json_objects
from mutate_changes.tool_process import failed, Ran, run_tool
from failure import Failure
from task_bench.features.feature_tasks import feature_tasks, Features, read_features
from task_bench.figures.figures import figures, Result, Side, SIDES, table
from task_bench.figures.run_figures import figures, Result, table
from git_cli import git_repo
from review_rules.review_folder import made_review_folder, REPORTS
from larv_review.history_commands import read_places
from task_bench.features.shipped_features import read_shipped, shipped_tasks, ShippedFeatures
from task_bench.figures.record_figures import recorded_bench
from run_heavy.capped_docker import SHARE_VARIABLE
from task_bench.bugs.rust_test_modules import tells_apart
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.
+1 -1
View File
@@ -12,7 +12,7 @@ from mutate_changes.tool_process import failed, Ran
from failure import Failure
from mutate_changes.changed_lines import is_test
from task_bench.api_proxy import PORT
from task_bench.bugs.rust_test_modules import with_tests_of
from task_bench.rust_test_modules import with_tests_of
MODEL = "claude-haiku-5-5"
# Where each run's container mounts its copy of the code, and its home folder: the paths in a run's stream start there.
+3 -1
View File
@@ -9,8 +9,10 @@ from task_bench.runs import checked_tree, Containers, ran_tests
from failure import Failure
from git_cli.git_repo import Git
from mutate_changes.tool_process import Ran
from task_bench.figures.figures import Side
# A bench's two sides: the commit before the change and the one after it.
Side = typing.Literal["base", "head"]
SIDES: tuple[Side, Side] = ("base", "head")
# The one commit of a task's tree doesn't name anyone, and neither a hook nor a signing key of the caller's reaches it.
COMMIT = ["-c", "user.name=task-bench", "-c", "user.email=task-bench@localhost", "-c", "commit.gpgsign=false", "-c", "core.hooksPath=/dev/null", "commit", "--quiet", "--message", "Import"]
@@ -4,10 +4,10 @@ import sys
import textwrap
import unittest
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[2]))
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
from task_bench.bugs import rust_test_modules
from task_bench.bugs.rust_test_modules import tells_apart
from task_bench import rust_test_modules
from task_bench.rust_test_modules import tells_apart
LIB = textwrap.dedent("""\
pub fn add(a: i32, b: i32) -> i32 {
+1 -1
View File
@@ -21,7 +21,7 @@ from task_bench.runs import checked_tree, closed, Containers, docker_cli, fix_at
from task_bench.bugs.plant import drawn
from claude_code.entries import Entry, entry_from
from failure import Failure
from task_bench.figures.figures import Figures, Result
from task_bench.figures.run_figures import Figures, Result
from task_bench.bugs.planted_mutant import Mutant
from mutate_changes.tool_process import Ran
from claude_code.tokens import Tokens