From 857fb288ceb83ec2a0b1e12d4373808308980704 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 15:32:41 +0000 Subject: [PATCH 1/2] Fail pre-review's pre-push check on a test a merge dropped A merge that resolves a conflict by taking one side can drop tests the base added, and nothing noticed: the suite still passes without them. `pre-review.py --pre-push` now reads every test under Tests at the base and at the head. A test is named by its function wherever its file is. One whose body is the same, or nine tenths alike, under a new name is counted as renamed; one a commit of the branch removes is listed with that commit; any other test the base has and the head lacks fails the check and is named. It takes about half a minute. Generated output: unchanged Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01HLuVQLHq43QvdYBYGWTdSo --- .claude/skills/pre-review/SKILL.md | 2 +- .claude/skills/pre-review/pre-review.py | 172 +++++++++++++++++++++++- 2 files changed, 170 insertions(+), 4 deletions(-) diff --git a/.claude/skills/pre-review/SKILL.md b/.claude/skills/pre-review/SKILL.md index 7cdc7cb6b4..20d7a885e6 100644 --- a/.claude/skills/pre-review/SKILL.md +++ b/.claude/skills/pre-review/SKILL.md @@ -12,7 +12,7 @@ description: Run the checks a branch owes before review (lint, the suites it tou 3. Put the block in the hand-back, whole, and answer each list above its `result:` line: for each call that sorts or picks by a label, a name or a position, why that order is allowed ("What may follow names" in `CLAUDE.md`); for each added test of a choice or an order, how many candidates it has (twenty or more, or a permutation of six); for each run of changed lines no corpus graph executed, its disposition ("Coverage of a change" in `.claude/rules/fuzzer-corpora.md`); for each file the change shares with another open pull request or lane branch, that this branch is stacked on that one, or why it need not be (two changes that each owe a pins run share the fuzzer's pins: the pull requests that do are listed too, and the lane branches counted). An instruction file the change edits that the block lists as at or near its limit is trimmed or split before review, not answered. The first list sees calls only: an order inherited from a loop over a list already in label order is still yours to look for. 4. When the work has a brief with a shape matrix, add `--matrix BRIEF --hand-back DRAFT`: the block then lists each cell (a table row whose first column is a number such as `6.11`) that the draft does not account for. Name the cell, or a range such as `6.1–6.4`, at the start of a line, a list item or a clause after a semicolon, or after the word "cell", and right after it its test in backticks, its seed, or `unchanged`, `stopped` or `not done`. -Before every push that starts CI, run `python3 -I S --pre-push [BASE]` first: lint, a search of every tracked text file for a conflict marker a merge or rebase left (`<<<<<<<` or `>>>>>>>` at the start of a line), `Scripts/check-claude-instruction-files.sh` (each instruction file's limit and what the rules load together for one source file, which "Check Markdown links" fails on), then side by side the changed-line coverage script over the whole suite (generated code not compiled), with every line the change did not touch that a test ran on `BASE` and none runs now (the base is measured once per machine and kept; each such line fails the check, and since CI also counts the other platform, push over one only by saying in the pull request why that platform executes it), the tests that fail, in two groups, "new on head" and "also failing on base" (the base's failures are kept with its counts; only a new one stops a push, and a head with none reads `PUSH (inherited failures: N)`; the suites the change touches run a second time with their generated code compiled, since the whole suite skips that compile and a test whose verdict rests on it passes there whatever the code, and the step says so), and CI's release build of the tool, which fails on a compiler warning under `Sources/` or `Plugins/`. It takes minutes, asks GitHub nothing, pushes nothing and starts no run, and prints a "Pre-push block" that names the head and the toolchain that compiled it. A pass is of that toolchain only: CI builds with Swift 6.2, Xcode 26 and Swift 6.3, so code a newer compiler accepts can still fail there. It is not the pre-review block. While writing a change, `python3 -I S --changed-lines [BASE]` runs the coverage script alone in the same worktree, so both use one warm build. +Before every push that starts CI, run `python3 -I S --pre-push [BASE]` first: lint, a search of every tracked text file for a conflict marker a merge or rebase left (`<<<<<<<` or `>>>>>>>` at the start of a line), `Scripts/check-claude-instruction-files.sh` (each instruction file's limit and what the rules load together for one source file, which "Check Markdown links" fails on), the tests `BASE` has and the head lacks (a test is its function's name wherever its file is; one whose body is the same or nine tenths alike under a new name is renamed; one a commit of the branch removes is listed with that commit; any other fails the check, since a merge that took one side of a conflict dropped it and the suite still passes without it), then side by side the changed-line coverage script over the whole suite (generated code not compiled), with every line the change did not touch that a test ran on `BASE` and none runs now (the base is measured once per machine and kept; each such line fails the check, and since CI also counts the other platform, push over one only by saying in the pull request why that platform executes it), the tests that fail, in two groups, "new on head" and "also failing on base" (the base's failures are kept with its counts; only a new one stops a push, and a head with none reads `PUSH (inherited failures: N)`; the suites the change touches run a second time with their generated code compiled, since the whole suite skips that compile and a test whose verdict rests on it passes there whatever the code, and the step says so), and CI's release build of the tool, which fails on a compiler warning under `Sources/` or `Plugins/`. It takes minutes, asks GitHub nothing, pushes nothing and starts no run, and prints a "Pre-push block" that names the head and the toolchain that compiled it. A pass is of that toolchain only: CI builds with Swift 6.2, Xcode 26 and Swift 6.3, so code a newer compiler accepts can still fail there. It is not the pre-review block. While writing a change, `python3 -I S --changed-lines [BASE]` runs the coverage script alone in the same worktree, so both use one warm build. A block is of one head. Reviewing a hand-back, compare the block's `head:` with the commit under review and run `--report` on that commit when in doubt: a hand-back with no block, a block of another head, or one that says `NOT READY` goes back before it is read. diff --git a/.claude/skills/pre-review/pre-review.py b/.claude/skills/pre-review/pre-review.py index 34fb7d4bce..12a5280882 100644 --- a/.claude/skills/pre-review/pre-review.py +++ b/.claude/skills/pre-review/pre-review.py @@ -726,7 +726,7 @@ def pre_push_block(head, branch, base, commits, uncommitted, toolchain, steps, i if uncommitted: lines.append("uncommitted changes in the checkout: they are not this head's, and no check saw them") ready = False - for name in ("lint", "conflict markers", "instruction files", "tests", "changed-line coverage", "whole-tree coverage", "release build"): + for name in ("lint", "conflict markers", "instruction files", "dropped tests", "tests", "changed-line coverage", "whole-tree coverage", "release build"): text, passed, details = steps.get(name, ("not run", False, [])) lines.append(f"{name}: {text}") lines += [f" {detail}" for detail in details] @@ -1040,6 +1040,134 @@ def conflict_markers_step(status_code, lines): return (f"failed: {len(found)} conflict marker line(s) in {len(files)} file(s)", False, found[:20] + ([f"and {len(found) - 20} more"] if len(found) > 20 else [])) +TEST_ATTRIBUTE = re.compile(r"@Test\b") +TEST_FUNCTION = re.compile(r"^(\s*)(?:[a-z@()\w]+\s+)*func\s+(`[^`]+`|\w+)\s*[(<]") + + +def tests_in(text): + """`(name, body)` for each test function of one Swift file: a function after `@Test`, or an XCTest `func test…`. + A body runs to the first line that is the function's own indentation and a closing brace, which a line of a + multi-line string of generated code, indented deeper, never is.""" + lines = text.split("\n") + found, pending = [], False + for index, line in enumerate(lines): + if TEST_ATTRIBUTE.search(line): + pending = True + match = TEST_FUNCTION.match(line) + if not match: + continue + indentation, name = match.group(1), match.group(2) + if pending or name.startswith("test"): + end = index + 1 + while end < len(lines) and lines[end] != indentation + "}": + end += 1 + found.append((name, "\n".join(lines[index + 1 : end]))) + pending = False + return found + + +def tests_missing(base_tests, head_tests): + """What the base has and the head lacks, as `(renamed, missing)`. Both arguments map a test's function name to + its `(path, body)` entries, since two suites may each have a test of one name. A test is named by its function + wherever its file is, so one that moved is not missing. A missing test is renamed when a test whose name the + base does not have has its body, white space aside, or one at least nine tenths alike; `renamed` holds + `(name, path, new name, new path)` and `missing` holds `(name, path)`.""" + + def squeezed(body): + return re.sub(r"\s+", "", body) + + import difflib + + new = sorted((name, path, squeezed(body)) for name, entries in head_tests.items() if name not in base_tests for path, body in entries) + by_body = {} + for name, path, body in new: + by_body.setdefault(body, (name, path)) + renamed, missing = [], [] + for name in sorted(base_tests): + short = len(base_tests[name]) - len(head_tests.get(name, ())) + if short <= 0: + continue + head_paths = collections.Counter(path for path, _ in head_tests.get(name, ())) + gone = [] + for path, body in base_tests[name]: + if head_paths[path] > 0: + head_paths[path] -= 1 + else: + gone.append((path, squeezed(body))) + for path, body in gone[:short]: + twin = by_body.get(body) if body else None + if twin is None and body: + best = 0.9 + for other, other_path, other_body in new: + matcher = difflib.SequenceMatcher(None, body, other_body, autojunk=False) + if matcher.real_quick_ratio() >= best and matcher.quick_ratio() >= best and matcher.ratio() >= best: + best, twin = matcher.ratio(), (other, other_path) + if twin is None: + missing.append((name, path)) + else: + renamed.append((name, path, *twin)) + return renamed, missing + + +def removed_test_names(patch_lines, names): + """`{name: commit}` for each of the names whose `func name(` a commit of the patch removes. The patch is + `git log --no-merges --format=commit %h %s -p -U0`'s output over the branch's own commits, newest first, so the + commit kept is the newest that removes the name.""" + wanted = {name.strip("`") for name in names} + removed, commit = {}, "" + pattern = re.compile(r"^-(?!--).*\bfunc\s+`?(\w[^`(<]*)`?\s*[(<]") + for line in patch_lines: + if line.startswith("commit "): + commit = line[len("commit ") :] + continue + match = pattern.match(line) + if match and match.group(1).strip() in wanted: + removed.setdefault(match.group(1).strip(), commit) + return removed + + +def dropped_tests_step(base_name, base_count, head_count, renamed, missing, removed): + """The step that fails on a test the base has, the head lacks and no commit of the branch removes: a merge that + resolved a conflict by taking one side dropped it, and nothing else reads for that, since the suite still passes + without it. A test one of the branch's own commits removes is listed with that commit and does not fail the + step; its pull request says why. The base is the commit named, not the merge base, which after a merge is the + base itself.""" + by_branch = [(name, path) for name, path in missing if name.strip("`") in removed] + by_merge = [(name, path) for name, path in missing if name.strip("`") not in removed] + counts = f"{base_count} tests on {base_name}, {head_count} on the head, {len(renamed)} renamed, {len(by_branch)} removed by the branch's own commits" + details = [f"removed by {removed[name.strip('`')]}: {name} ({path})" for name, path in by_branch[:20]] + details += [f"and {len(by_branch) - 20} more removed by the branch's own commits"] if len(by_branch) > 20 else [] + if not by_merge: + return (f"passed: {counts}", True, details) + dropped = [f"DROPPED, no commit of the branch removes it: {name} ({path})" for name, path in by_merge[:40]] + dropped += [f"and {len(by_merge) - 40} more dropped"] if len(by_merge) > 40 else [] + return (f"failed: {len(by_merge)} test(s) of {base_name} are missing and no commit of the branch removes them; {counts}", False, dropped + details) + + +def tests_at(commit, worktree): + """`{name: [(path, body)]}` of every test under `Tests` at the commit.""" + tests = collections.defaultdict(list) + _, _, paths = timed(["git", "ls-tree", "-r", "--name-only", commit, "--", "Tests"], worktree) + for path in paths: + if path.endswith(".swift"): + shown = subprocess.run(["git", "show", f"{commit}:{path}"], cwd=worktree.path, capture_output=True, text=True, errors="replace") + for name, body in tests_in(shown.stdout): + tests[name].append((path, body)) + return tests + + +def dropped_tests(base_name, worktree): + base_tests, head_tests = tests_at(base_name, worktree), tests_at("HEAD", worktree) + renamed, missing = tests_missing(base_tests, head_tests) + removed = {} + if missing: + alternatives = "|".join(sorted({re.escape(name.strip("`")) for name, _ in missing})) + _, _, patch = timed(["git", "log", "--no-merges", "--format=commit %h %s", "-p", "-U0", "-G", f"func `?({alternatives})`?[(<]", f"{base_name}..HEAD", "--", "Tests"], worktree) + removed = removed_test_names(patch, [name for name, _ in missing]) + count = lambda tests: sum(len(entries) for entries in tests.values()) + return dropped_tests_step(base_name, count(base_tests), count(head_tests), renamed, missing, removed) + + def instruction_files_step(status_code, seconds, lines): """The step that runs `Scripts/check-claude-instruction-files.sh`, as "Check Markdown links" does: each file's limit, and what the rules files load together for one source file, which no one file's size shows. The script @@ -1078,6 +1206,8 @@ def __setitem__(self, name, step): steps["conflict markers"] = conflict_markers_step(status_code, lines) # Seconds, and CI's "Check Markdown links" fails on it: without the runner, since it needs git and Python only. steps["instruction files"] = instruction_files_step(*timed(["Scripts/check-claude-instruction-files.sh"], worktree)) + # About a minute: it reads every test file of both commits. + steps["dropped tests"] = dropped_tests(arguments.base, worktree) # Before anything that builds the head: the base is measured in this worktree, once per base and platform. started, base_was_kept = time.time(), base_counts_path(base).exists() @@ -2293,7 +2423,7 @@ def hanging(*arguments, seconds=None): {"Sources/A.swift": {"3": 0, "4": 0, "6": 0, "11": 0, "12": 0, "22": 0}, "Sources/B.swift": {"1": 0, "2": 0}, "Sources/New.swift": {"1": 0}, "Sources/Unrecorded.swift": {"1": 0}}, hunks, ), [("Sources/A.swift", 3), ("Sources/A.swift", 6), ("Sources/A.swift", 22), ("Sources/B.swift", 1)]) - passed_steps = {"lint": ("passed, 50 s", True, []), "conflict markers": ("passed", True, []), "instruction files": ("passed, 9 s", True, []), "tests": ("passed", True, []), "changed-line coverage": ("passed, 5 min 9 s", True, []), "whole-tree coverage": ("passed (base from the cache): every untouched line a test ran on 123 still runs in one", True, []), "release build": ("passed, 2 min 0 s", True, [])} + passed_steps = {"lint": ("passed, 50 s", True, []), "conflict markers": ("passed", True, []), "instruction files": ("passed, 9 s", True, []), "dropped tests": ("passed: 3 tests on b, 3 on the head, 0 renamed, 0 removed by the branch's own commits", True, []), "tests": ("passed", True, []), "changed-line coverage": ("passed, 5 min 9 s", True, []), "whole-tree coverage": ("passed (base from the cache): every untouched line a test ran on 123 still runs in one", True, []), "release build": ("passed, 2 min 0 s", True, [])} expect("a whole-tree failure names the platform that measured it and the one CI also counts", [measured_on_one_platform("linux"), measured_on_one_platform("darwin")], [ "measured on Linux only; CI also counts macOS, so push over a listed line only by saying in the pull request why macOS executes it", "measured on macOS only; CI also counts Linux, so push over a listed line only by saying in the pull request why Linux executes it", @@ -2305,6 +2435,7 @@ def hanging(*arguments, seconds=None): "lint: passed, 50 s", "conflict markers: passed", "instruction files: passed, 9 s", + "dropped tests: passed: 3 tests on b, 3 on the head, 0 renamed, 0 removed by the branch's own commits", "tests: passed", "changed-line coverage: passed, 5 min 9 s", "whole-tree coverage: passed (base from the cache): every untouched line a test ran on 123 still runs in one", @@ -2391,8 +2522,43 @@ def hanging(*arguments, seconds=None): ], ) expect("the conflict marker pattern takes a side's first and last line, and neither a heading's underline nor a longer run", [bool(re.search(CONFLICT_MARKER, line)) for line in ("<<<<<<< HEAD", ">>>>>>> lane", "<<<<<<<", "=======", "<<<<<<<<", " <<<<<<< HEAD")], [True, True, True, False, False, False]) + swift_test = lambda name, body, attribute="\t@Test\n": f"{attribute}\tfunc {name}() async throws {{\n{body}\n\t}}\n" + long_body = "\n".join(f"\t\tlet value{number} = make({number})\n\t\t#expect(value{number} == {number})" for number in range(12)) + base_file = "struct S {\n" + swift_test("kept", "\t\t#expect(1 == 1)") + swift_test("moved", "\t\t#expect(2 == 2)") + swift_test("renamedSame", long_body) + swift_test("renamedAlike", long_body.replace("make", "build")) + swift_test("gone", '\t\t#expect("""\n\t\t\tfunc inner() {\n\t\t\t}\n\t\t\t""" == output)') + swift_test("testOld", "\t\tXCTAssertTrue(true)", attribute="") + "\tfunc helper() {\n\t}\n}\n" + head_file = "struct S {\n" + swift_test("kept", "\t\t#expect(1 == 1)") + swift_test("renamedSameNow", long_body) + swift_test("renamedAlikeNow", long_body.replace("make", "build").replace("value3 == 3", "value3 == 4")) + swift_test("added", "\t\t#expect(9 == 9)") + "}\n" + base_tests, head_tests = collections.defaultdict(list), collections.defaultdict(list) + for name, body in tests_in(base_file): + base_tests[name].append(("Tests/A.swift", body)) + for name, body in tests_in(head_file): + head_tests[name].append(("Tests/A.swift", body)) + head_tests["moved"].append(("Tests/B.swift", "\t\t#expect(2 == 2)")) + expect( + "a file's tests are its functions after @Test and its XCTest functions, a helper is none, and a body does not end inside a multi-line string", + [sorted(base_tests), base_tests["gone"][0][1].count("inner")], + [["gone", "kept", "moved", "renamedAlike", "renamedSame", "testOld"], 1], + ) + renamed, missing = tests_missing(base_tests, head_tests) + expect( + "a test that moved files is not missing, one whose body is the same or nine tenths alike under a new name is renamed, and the rest are missing", + [renamed, missing], + [[("renamedAlike", "Tests/A.swift", "renamedAlikeNow", "Tests/A.swift"), ("renamedSame", "Tests/A.swift", "renamedSameNow", "Tests/A.swift")], [("gone", "Tests/A.swift"), ("testOld", "Tests/A.swift")]], + ) + two_of_a_name = {"kept": [("Tests/A.swift", "a"), ("Tests/C.swift", "c")]} + expect("of two tests of one name, the one whose file no longer has it is the missing one", tests_missing(two_of_a_name, {"kept": [("Tests/A.swift", "a")]}), ([], [("kept", "Tests/C.swift")])) + removed = removed_test_names(["commit abc Drop the old test", "--- a/Tests/A.swift", "-\tfunc testOld() async throws {", "+\tfunc gone() {", "commit def Older", "-\tfunc testOld() {", "-\tfunc other() {"], ["gone", "testOld"]) + expect("a name is removed by the newest commit of the branch that deletes its function line, and an added line removes nothing", removed, {"testOld": "abc Drop the old test"}) + expect( + "the dropped tests step fails on a test no commit of the branch removes, lists one a commit removes without failing, and passes with only those", + [dropped_tests_step("origin/main", 6, 5, renamed, missing, removed), dropped_tests_step("origin/main", 6, 5, renamed, [("testOld", "Tests/A.swift")], removed), dropped_tests_step("origin/main", 6, 6, [], [], {})], + [ + ("failed: 1 test(s) of origin/main are missing and no commit of the branch removes them; 6 tests on origin/main, 5 on the head, 2 renamed, 1 removed by the branch's own commits", False, ["DROPPED, no commit of the branch removes it: gone (Tests/A.swift)", "removed by abc Drop the old test: testOld (Tests/A.swift)"]), + ("passed: 6 tests on origin/main, 5 on the head, 2 renamed, 1 removed by the branch's own commits", True, ["removed by abc Drop the old test: testOld (Tests/A.swift)"]), + ("passed: 6 tests on origin/main, 6 on the head, 0 renamed, 0 removed by the branch's own commits", True, []), + ], + ) + expect("a block without the dropped tests step is not a pass", pre_push_block("abc", "lane", "b", 1, False, "t", {name: step for name, step in passed_steps.items() if name != "dropped tests"})[0].splitlines()[-1], "result: DO NOT PUSH") expect("a block without the conflict markers step is not a pass", pre_push_block("abc", "lane", "b", 1, False, "t", {name: step for name, step in passed_steps.items() if name != "conflict markers"})[0].splitlines()[-1], "result: DO NOT PUSH") - expect("a block without the instruction files step is not a pass", pre_push_block("abc", "lane", "b", 1, False, "t", {name: step for name, step in passed_steps.items() if name != "instruction files"})[0].splitlines()[-6:-4] + [pre_push_block("abc", "lane", "b", 1, False, "t", {name: step for name, step in passed_steps.items() if name != "instruction files"})[0].splitlines()[-1]], ["instruction files: not run", "tests: passed", "result: DO NOT PUSH"]) + expect("a block without the instruction files step is not a pass", pre_push_block("abc", "lane", "b", 1, False, "t", {name: step for name, step in passed_steps.items() if name != "instruction files"})[0].splitlines()[-7:-6] + [pre_push_block("abc", "lane", "b", 1, False, "t", {name: step for name, step in passed_steps.items() if name != "instruction files"})[0].splitlines()[-1]], ["instruction files: not run", "result: DO NOT PUSH"]) expect("a block whose only failures are inherited says to push and how many there are", pre_push_block("abc", "lane", "b", 1, False, "t", {**passed_steps, "tests": ("2 failed: 0 new on head, 2 also failing on base", True, [])}, inherited=2)[0].splitlines()[-1], "result: PUSH (inherited failures: 2)") expect("inherited failures do not turn another step's failure into a push", pre_push_block("abc", "lane", "b", 1, False, "t", {**passed_steps, "lint": ("failed", False, [])}, inherited=2)[0].splitlines()[-1], "result: DO NOT PUSH") failed_steps = {**passed_steps, "release build": ("failed, 2 min 0 s: 1 warning(s) in SafeDI's own sources", False, [build_log[0]])} From c9b15c7b54d200f6116e69c9320ffbe57e3fad73 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 15:38:52 +0000 Subject: [PATCH 2/2] Read a parameterized test whose arguments hold source text The arguments of a parameterized test may hold Swift source with functions of its own. The function after the attribute is the next one at the attribute's indentation, so such a test is no longer read as missing. Generated output: unchanged Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01HLuVQLHq43QvdYBYGWTdSo --- .claude/skills/pre-review/pre-review.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.claude/skills/pre-review/pre-review.py b/.claude/skills/pre-review/pre-review.py index 12a5280882..81b9fa5003 100644 --- a/.claude/skills/pre-review/pre-review.py +++ b/.claude/skills/pre-review/pre-review.py @@ -1049,20 +1049,24 @@ def tests_in(text): A body runs to the first line that is the function's own indentation and a closing brace, which a line of a multi-line string of generated code, indented deeper, never is.""" lines = text.split("\n") - found, pending = [], False + found, pending = [], None for index, line in enumerate(lines): if TEST_ATTRIBUTE.search(line): - pending = True + pending = line[: len(line) - len(line.lstrip())] match = TEST_FUNCTION.match(line) if not match: continue indentation, name = match.group(1), match.group(2) - if pending or name.startswith("test"): + # The attribute's function is the next one at the attribute's own indentation: the arguments of a + # parameterized test may hold source text with functions of its own, indented deeper. + if pending is not None and indentation != pending: + continue + if pending is not None or name.startswith("test"): end = index + 1 while end < len(lines) and lines[end] != indentation + "}": end += 1 found.append((name, "\n".join(lines[index + 1 : end]))) - pending = False + pending = None return found @@ -2537,6 +2541,11 @@ def hanging(*arguments, seconds=None): [sorted(base_tests), base_tests["gone"][0][1].count("inner")], [["gone", "kept", "moved", "renamedAlike", "renamedSame", "testOld"], 1], ) + expect( + "a parameterized test whose arguments hold source text with a function of its own is the function after the arguments, and that inner function is no test", + tests_in('struct S {\n\t@Test(arguments: [\n\t\t"""\n\t\t public static func mock() -> Leaf {\n\t\t }\n\t\t""",\n\t])\n\t@available(macOS 13.0, *)\n\tmutating func keepsCells(source: String) async throws {\n\t\t#expect(true)\n\t}\n}\n'), + [("keepsCells", "\t\t#expect(true)")], + ) renamed, missing = tests_missing(base_tests, head_tests) expect( "a test that moved files is not missing, one whose body is the same or nine tenths alike under a new name is renamed, and the rest are missing",