Bench features in task-bench with --tasks features, from the folder the config names as bench-tasks
CI / tests (pull_request) Has been cancelled

This commit is contained in:
2026-11-23 16:31:27 +01:00
parent 28537b5aa3
commit cdeb66bf6e
17 changed files with 735 additions and 199 deletions
+8 -4
View File
@@ -55,6 +55,10 @@ EPIC_BRANCH = "epic-branch"
REVIEW_REQUEST_COMMENT = "review-request-comment"
# An optional path setting: main's help says what it places.
TOUCH_PREDICTIONS = "touch-predictions"
# An optional path setting: the folder of the features `task-bench --tasks features` has Haiku build, whose help says what a feature's folder holds. The plan item that added it named the setting.
BENCH_TASKS = "bench-tasks"
# The path settings a project may leave out, in the order `places` prints them after SETTINGS.
OPTIONAL_PATHS = (TOUCH_PREDICTIONS, BENCH_TASKS)
# An optional setting: a list of paths, each spelt as SPELLING says, to the files that hold the team's own coding conventions, which each reviewer agent larv-review launches reads. Three readers, seated as the human who writes a client's config, picked the spelling 2-1 from four candidates, over a bare `conventions`, which they confused with `principles` and `working-rules`.
CODING_CONVENTIONS = "coding-conventions"
# Two optional settings, each a name, set together and only where `plan` names a Jira epic: the name of the workflow transition that finishes an item, and of the status it must lead to. Three readers, seated as the human who writes a client's config, picked the spelling from four candidates: two flat keys, as the other settings are, with a prefix that says what they apply to.
@@ -177,9 +181,9 @@ class ProjectConfig:
@property
def places(self) -> dict[str, str]:
"""Where each of SETTINGS is kept, in SETTINGS' order, then TOUCH_PREDICTIONS where the config sets it: a path, or the epic or page as the config spells it."""
"""Where each of SETTINGS is kept, in SETTINGS' order, then each of OPTIONAL_PATHS the config sets: a path, or the epic or page as the config spells it."""
spelt = {name: kept.spelling for name, kept in {"plan": self.epic, "goals-and-audience": self.goals_epic, **self.pages}.items() if kept}
return {name: spelt[name] if name in spelt else str(self.paths[name]) for name in (*SETTINGS, TOUCH_PREDICTIONS) if name in spelt or name in self.paths}
return {name: spelt[name] if name in spelt else str(self.paths[name]) for name in (*SETTINGS, *OPTIONAL_PATHS) if name in spelt or name in self.paths}
@property
def texts(self) -> dict[str, str]:
@@ -216,7 +220,7 @@ def load(top: pathlib.Path, main: pathlib.Path, home: pathlib.Path) -> ProjectCo
if len(named) > 1:
return Failure(f"{' and '.join(str(file) for file, _ in named)} each name the checkout {main}; only one config may")
file, values = named[0]
paths = {name: placed(values[name], top, file.parent, home) for name in (*SETTINGS, TOUCH_PREDICTIONS) if name in values}
paths = {name: placed(values[name], top, file.parent, home) for name in (*SETTINGS, *OPTIONAL_PATHS) if name in values}
epics = {name: epic_of(values.get(name)) for name in EPIC_SPELLINGS}
pages = {name: page for name in RECORDS if (page := page_of(values.get(name)))}
conventions = conventions_of(values.get(CODING_CONVENTIONS, []), top, file.parent, home)
@@ -388,7 +392,7 @@ SCALARS = (
Scalar(REVIEW_REQUEST_COMMENT, "review_request_comment", text_read(comment_fault)),
Scalar(JIRA_FINDING_TYPE, "jira_finding_type", text_read(type_fault)),
)
OPTIONAL = tuple(sorted({CODING_CONVENTIONS, ENV_FILE, TOUCH_PREDICTIONS, *JIRA_PLAN_ONLY, *(scalar.name for scalar in SCALARS)}))
OPTIONAL = tuple(sorted({CODING_CONVENTIONS, ENV_FILE, *OPTIONAL_PATHS, *JIRA_PLAN_ONLY, *(scalar.name for scalar in SCALARS)}))
def lies_in(path: pathlib.Path, *places: pathlib.Path) -> bool: