Refuse a register entry that is no regular file, and say data source in what task-bench prints

This commit is contained in:
2026-11-23 19:49:22 +01:00
parent c798278406
commit 44c0f13883
11 changed files with 94 additions and 63 deletions
+7 -2
View File
@@ -1,4 +1,4 @@
"""What task-bench's two kinds of task share. One kind is a planted bug, the other a feature to build. They share the task itself, the bench it runs in, and the
"""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
steps that commit a task's tree and run the tests over a copy of one."""
import dataclasses
import pathlib
@@ -23,10 +23,15 @@ class Kind(typing.NamedTuple):
prompt: str
without: str
@property
def key(self) -> str:
"""The noun as results.json and a run's file name spell it, without a space."""
return self.noun.replace(" ", "-")
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")
DATA_SOURCE = Kind("data source", "Add the data source below to this project.\n\n{told}", "a data source's acceptance tests")
# 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