fix(bench): an unparsable file in one ordinary commit no longer ends a repository's history walk

The combined access-control freeze stopped at its 31st repository: one ordinary commit of a PHP tree touched a
Python file that does not parse, functions() raised Rejected, and ordinary_history let it end the walk. The
file is now marked parse_failed on its row and such a commit is rejected as an ordinary push (reason
function_parse), which keeps the draw conservative without losing the repository.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Marius Ciepluch
2026-10-14 08:42:25 +02:00
co-authored by Claude Fable 5.1
parent 351d73079a
commit 30ad197d3f
2 changed files with 21 additions and 1 deletions
+11
View File
@@ -683,3 +683,14 @@ def test_history_limit_walks_only_the_newest_commits(history):
assert e.ordinary_history(git, "HEAD", limit=2) == full[:2] # the newest first-parent commits, same rows
with pytest.raises(ValueError, match="positive integer"):
e.ordinary_history(git, "HEAD", limit=0)
def test_unparsable_source_in_one_ordinary_commit_rejects_that_commit_only(history):
"""A syntax error in one file of one ordinary commit used to end the whole repository's history walk."""
git, commit, candidate, _, _, _, _ = history
broken = commit("def handler(value):\n return value\n", "ordinary", extra={"broken.py": "def (\n"})
rows = e.ordinary_history(git, "HEAD")
row = next(r for r in rows if r["head"] == broken)
assert [f["path"] for f in row["files"] if f["parse_failed"]] == ["broken.py"]
assert e.ordinary_rejection(row, set(), set()) == "function_parse"
assert e.introducing(git, candidate) is not None