Merge remote-tracking branch 'origin/main' into item-561
CI / tests (pull_request) Has been cancelled

This commit is contained in:
2026-12-03 14:27:32 +01:00
5 changed files with 19 additions and 25 deletions
+1
View File
@@ -2,6 +2,7 @@
## Unreleased
- Make `task-bench` commit the copy it runs each side's tests in, so a project's tests that call git, such as `git ls-files`, pass the baseline instead of failing with "not a git repository".
- The review sweep before each round now also runs each builtin, flag or option a change adds with a value just outside each input range its docs state, and the product-owner reviewer flags a doc line that leaves out what that run printed.
- larv-review fetches each web page that a changed prose claim cites as its source and hands the page to the prose reviewer, which has no web access, so it checks the claim against the page instead of marking it ❓.
- The review sweep before each round now also looks for sentences that claim something of every or each member of a set, such as every locale, and fixes the ones a newly added member makes false.
+2 -2
View File
@@ -514,7 +514,7 @@ def benched(bench: Bench, planned: Planner) -> list[str] | Failure:
def baseline_failure(bench: Bench) -> Failure | None:
"""Why a side's tests don't pass without a task; None where they pass at both sides."""
for side, tree in bench.trees.items():
ran = tests_in_copy(bench.containers, tree, bench.folder)
ran = tests_in_copy(bench.containers, tree, bench.folder, bench.git)
if isinstance(ran, Failure) or ran.code:
return ran if isinstance(ran, Failure) else failed(f"The tests fail at the {side} without {bench.asked.kind.without}: the test command", ran)
return None
@@ -630,7 +630,7 @@ def planted_tree(bench: Bench, side: Side, tree: pathlib.Path, path: str, change
(tree / path).write_bytes(changed)
except OSError as failure:
return Failure(f"could not plant the bug in {tree}: {failure}")
ran = tests_in_copy(bench.containers, str(tree), bench.folder)
ran = tests_in_copy(bench.containers, str(tree), bench.folder, bench.git)
# Tests that never end under the bug have no message.
if isinstance(ran, TimedOut):
return None
+4 -3
View File
@@ -103,14 +103,15 @@ def committed(git: Git, tree: str) -> Failure | None:
return None
def tests_in_copy(containers: Containers, tree: str, folder: pathlib.Path) -> Ran | Failure:
"""The test command's run in a copy of tree, removed afterwards, so what the tests write stays out of tree."""
def tests_in_copy(containers: Containers, tree: str, folder: pathlib.Path, git: Git) -> Ran | Failure:
"""The test command's run in a copy of tree, removed afterwards, so what the tests write stays out of tree. The copy gets a repository
of its own with one commit first, since a project's tests may call git and a tree from `git archive` holds none."""
copy = folder / "tested"
copied = on_disk(f"copy {tree} to test it", lambda: shutil.copytree(tree, copy, symlinks=True))
if isinstance(copied, Failure):
return copied
try:
return ran_tests(containers, str(copy))
return committed(git, str(copy)) or ran_tests(containers, str(copy))
finally:
shutil.rmtree(copy, ignore_errors=True)
+12 -1
View File
@@ -298,6 +298,11 @@ class BenchTest(unittest.TestCase):
self.assertEqual(log, "task-bench Import\n")
self.assertEqual(subprocess.run(["git", "status", "--porcelain"], cwd=tree, env=self.env, check=True, capture_output=True, text=True).stdout, "")
def test_tests_that_call_git_run_in_a_repository_at_each_side(self):
# `git ls-files` fails in a tree that isn't a repository.
found = self.bench(**{"--test": "git ls-files --error-unmatch calc.go >/dev/null && sh calc_test.go"})
self.assertNotIsInstance(found, Failure, found)
def test_claude_runs_in_the_benchs_image_on_its_network_with_the_message_alone_and_the_token_by_name(self):
self.bench(**{"--runs": "1"})
calls = self.calls()
@@ -589,7 +594,13 @@ class RunOutcomesTest(unittest.TestCase):
def test_a_tree_that_cannot_be_copied_for_its_tests_fails_the_bench_naming_it(self):
gone = str(self.folder / "gone")
self.assertFailsWith(main.tests_in_copy(self.containers(), gone, self.folder), f"could not copy {gone} to test it: ")
self.assertFailsWith(main.tests_in_copy(self.containers(), gone, self.folder, self.bench().git), f"could not copy {gone} to test it: ")
def test_a_copy_that_cannot_be_committed_fails_the_bench_and_is_removed(self):
tree = self.folder / "tree"
tree.mkdir(exist_ok=True)
self.assertFailsWith(main.tests_in_copy(self.containers(), str(tree), self.folder, lambda *args, **given: Failure("no git")), "no git")
self.assertFalse((self.folder / "tested").exists())
def test_a_tree_whose_folder_cannot_be_made_fails_the_bench_naming_it(self):
(self.folder / "file").write_text("")
-19
View File
@@ -20,7 +20,6 @@
| 483 | 0.18.0 | 482, 484 | owner | **Run every claude the loop starts in a Claude home that the commands generate under `~/.local/share/build-release/` and refresh when the clone's tag changes, with the enabled plugins installed there and the person signed in by `/login` in that home.** | 4 | 2 | 3 | 7 | 7 | 2 by 8 | 0.5 |
| 486 | 0.18.0 | 483, 485 | owner | **Open an interactive claude with the setup loaded through one wrapper command, which sets the generated home and `PATH` and passes every argument on to claude.** | 2 | 1 | 1 | 2 | 3 | 2 by 2 | 0.5 |
| 577 | 0.18.0 | 483, 486, 575 | owner | **Test in the gate that a container holding only a stock Claude Code runs a chunk from a clone, against a mock Messages API, and that the run leaves the container's own `~/.claude` as it was.** | 3 | 1 | 2 | 4 | 6 | 3 by 9, 2 by 5 | 5.2 |
| 571 | 0.18.0 | | | **Make `task-bench` run a project's tests that call git, such as `git ls-files` and `git show :settings.json`, when started from a chunk's worktree, or fail before its first run with a message naming the cause.** | 2 | 1 | 1 | 2 | 3 | 1.1 by 3, 1.4 by 2 | 1.4 |
| 576 | 0.18.0 | 485, 575 | owner | **Name the project `dev-factory` in the README, the prose and the tools, and say in the changelog that the repo moved.** | 2 | 2 | 2 | 4 | 4 | 2 by 1, 6 by 1 | 0.4 |
| 578 | 0.18.0 | 576, 577 | owner | **Ship one chunk of this repo, to a merged pull request, from a clone of `main` that runs in the generated home, beside the untouched `~/.claude`.** | 1 | 2 | 1 | 2 | 1 | 2 by 4 | 1.2 |
| 561 | 0.18.0 | | | **Clean up a do-epic chunk whose pull request has merged without waiting for a running slot, and close its window.** | 2 | 2 | 2 | 4 | 3 | 1.5 by 2 | 0.5 |
@@ -598,24 +597,6 @@ Touches:
- `.gitignore`
- `README.md`: `## Test` (small)
### 571. Make `task-bench` run a project's tests that call git, such as `git ls-files` and `git show :settings.json`, when started from a chunk's worktree, or fail before its first run with a message naming the cause.
Found while finishing item 565's chunk: `task-bench`, started from the chunk's worktree with `CLAUDE_CODE_OAUTH_TOKEN` exported, failed its baseline. Inside the container, this repo's tests failed with "not a git repository": `git ls-files` exited 128, and `git show :settings.json` failed. The chunk recorded no bench figures.
The cause is not verified, so the first step is to reproduce it: run the bench once from a worktree and once from the main checkout. Two causes fit:
- A worktree's `.git` is a file that points at the main checkout's git folder, which the container doesn't mount.
- More likely from the code: `archived` in `bin/task_bench/main.py` builds each side's tree with `git archive`, which leaves out `.git`. `baseline_failure` then tests that tree through `tests_in_copy` before `committed` has given it a repository. So any test that calls git, such as `bin/repo_checks/test_settings.py`, `test_import_order.py` and `test_citations.py`, would fail from the main checkout too.
Where the second cause holds, give each side's tree a repository with its files staged and committed (`committed` in `bin/task_bench/tasks.py` already does this for a planted tree) before its tests run. Then the copy `tests_in_copy` makes carries it. Either way, write first a test in `bin/task_bench/test_task_bench.py` that fails today. Where no fix fits, fail before the first run, naming the cause.
`Planner` in `bin/task_bench/main.py:241` is a place the comprehension seats found hard. Leave it alone unless the change touches it; if it does, make it easier to read.
Touches:
- `bin/task_bench/main.py`: `bench_in`, `archived` (small)
- `bin/task_bench/tasks.py`: `committed`, `tests_in_copy` (small)
- `bin/task_bench/test_task_bench.py`
### 576. Name the project `dev-factory` in the README, the prose and the tools, and say in the changelog that the repo moved.
Part of the standalone-install plan lilleman approved on 2026-11-20, as reshaped on 2026-12-03 when 0.18.0 was planned. Split from item 496, which keeps the renames that wait for the harness interface, such as `CLAUDE.md`. Renaming the repo on the forge is lilleman's, and it changes every clone's remote. A project's key comes from its clone's folder name, and tmux session names from the key, so say in the changelog what renaming the clone's folder changes. Revise the decision "names", which still says the code keeps today's names and calls harness independence an open aim: it is goal 6.