Bench rebuilding a shipped feature: take its chunk's change out, tell Haiku the item's tagline, check with the tests the change holds

This commit is contained in:
2026-11-24 00:29:25 +01:00
parent c0445a26d7
commit 87726f9f0b
7 changed files with 222 additions and 35 deletions
+6 -3
View File
@@ -1,4 +1,4 @@
"""What task-bench's three kinds of task share: a planted bug, a feature to build and a data source to add. They share the task itself, the bench it runs in, and the
"""What task-bench's four kinds of task share: a planted bug, a feature to build, a data source to add and a shipped feature to rebuild. They share the task itself, the bench it runs in, and the
steps that commit a task's tree and run the tests over a copy of one."""
import dataclasses
import pathlib
@@ -32,11 +32,14 @@ class Kind(typing.NamedTuple):
BUG = Kind("bug", "A test of this project fails with the message below. Find the bug in the code and fix it. Change no test.\n\n{told}", "a planted bug")
FEATURE = Kind("feature", "Build the feature below in this project.\n\n{told}", "a feature's acceptance tests")
DATA_SOURCE = Kind("data source", "Add the data source below to this project.\n\n{told}", "a data source's acceptance tests")
# What Haiku is asked is a feature's prompt: the feature is new to the tree Haiku gets.
SHIPPED = Kind("shipped feature", FEATURE.prompt, "a shipped feature taken out")
# By the value --tasks takes. A panel of three readers, seated as the README's audience, picked `--tasks features` on 2026-11-23,
# 3 to 0, over a bare `--features` and a `features` subcommand: it names what the bench runs, and the bugs as its other value.
# Such a panel picked `data-sources` the same day, 3 to 0, over `sources` and `imports`, which read as source code and as import
# statements.
KINDS = {"bugs": BUG, "features": FEATURE, "data-sources": DATA_SOURCE}
# statements. Such a panel picked `shipped-features` on 2026-11-24, 3 to 0, over `shipped`, `rebuilds`, `reverts` and `history`:
# it says what was shipped, and stands apart from the features someone wrote for the bench.
KINDS = {"bugs": BUG, "features": FEATURE, "data-sources": DATA_SOURCE, "shipped-features": SHIPPED}
@dataclasses.dataclass(frozen=True)