Answer prose round 1: 0 🔴, 12 🟡 (0 misread); keep a {} line as an entry, point handed_on and parked_through at the docstrings that hold their rules, split news_after's two kinds of news, say what each parameter is, reword item 517's way out, and report a .tar left behind as its own failure

This commit is contained in:
2026-11-23 02:30:59 +01:00
parent ba50eacafe
commit 83194a11a5
14 changed files with 36 additions and 30 deletions
+6 -6
View File
@@ -61,7 +61,7 @@ Each bench empties its own folder first, and removes the folder every earlier be
not, unless a bench or a gather is using it. So gather a bench before the next one starts.
Exit 1, saying why, on an unknown or repeated argument, a missing --image or --test, a --seed, --bugs or --runs that is no whole
number from 1, or no token; and where git, docker or Gremlins fails, the seats' places name no Go file, the tests fail at a side
number from 1, or no token; and where git, docker or Gremlins fails, the seats' places don't name any Go file, the tests fail at a side
without a bug, or no mutant becomes a bug. Where the API refuses a run, the bench stops there and exits 1 too, after the table of
the runs that finished.
gather exits 1, saying why, outside a checkout, without a digest, where loop-claude has saved no model for the project or the
@@ -237,7 +237,7 @@ def bench_in(folder: pathlib.Path, given: dict[str, str], env: typing.Mapping[st
trees[side] = tree
files = [path for path in place_files(places) if pathlib.Path(trees["base"], path).is_file()]
if not files:
return Failure("The places the seats found hard name no Go file that the base holds, so there is nowhere to plant a bug.")
return Failure("The places the seats found hard don't name any Go file that the base holds, so there is nowhere to plant a bug.")
run = functools.partial(run_tool, prefix=given.get("--prefix"), env=env, killpg=os.killpg)
mutants = killed_mutants(trees["base"], files, run, CPUS_PER_SLOT)
if isinstance(mutants, Failure):
@@ -274,10 +274,10 @@ def archived(commit: str, into: pathlib.Path, checkout: str, git: Git) -> str |
try:
with tarfile.open(archive) as held:
held.extractall(into, filter="tar")
archive.unlink()
except (tarfile.TarError, OSError) as failure:
return Failure(f"could not unpack the tree at {commit}: {failure}")
return str(into)
removed = on_disk(f"remove {archive}", archive.unlink)
return removed if isinstance(removed, Failure) else str(into)
def benched(bench: Bench, mutants: list[Mutant]) -> list[str] | Failure:
@@ -300,7 +300,7 @@ def benched(bench: Bench, mutants: list[Mutant]) -> list[str] | Failure:
def baseline_failure(bench: Bench) -> Failure | None:
"""Why a side's tests don't pass without a planted bug; None where both sides' pass."""
"""Why a side's tests don't pass without a planted bug; None where they pass at both sides."""
for side, tree in bench.trees.items():
ran = tests_in_copy(bench.containers, tree, bench.folder)
if isinstance(ran, Failure) or ran.code:
@@ -336,7 +336,7 @@ def ran_fixes(bench: Bench, tasks: list[Task], total: int) -> Fixes:
def kept(bench: Bench, tasks: list[Task], names: dict[int, str], results: list[Result]) -> Failure | None:
"""Writes results.json and the digest into the bench's folder, with names the bugs' names by number."""
"""Writes results.json and the digest into the bench's folder. names holds each bug's name by its number."""
in_a_tree = lambda path: any(pathlib.Path(tree, path).is_file() for tree in bench.trees.values())
recorded_runs = json.dumps({"sides": bench.sides, "seed": bench.asked.seed, "bugs": names, "runs": [recorded(result) for result in results]}, indent="\t") + "\n"
digest_text = digest(bench.sides, table(results, names), [digested(task, results, bench.folder) for task in tasks], in_a_tree)