Skip to content

Commit 475d320

Browse files
authored
fix(coverage): exclude convergence tests from map build; --no-verify bot commit (#1464)
The coverage-map builder ran every test directly, including convergence tests (kind=convergence). Those are order-of-accuracy checks driven by convergence.py, which fills grid resolution and patch geometry per refinement level at runtime; their base params are skeletons (m=n=p=0, no geometry) that cannot run standalone, so all 32 failed pre_process during collection. Exclude them from the map: absent entries are conservatively always-run by select_tests (rung 5), the desired behavior for convergence checks anyway. Separately, the refresh workflow's commit-back ran the repo pre-commit hook (./mfc.sh precheck/spelling) against the clean:false working tree (polluted with leftover SLURM coverage artifacts), aborting the commit before the push ever ran. The bot commit stages only the binary map; use git commit --no-verify.
1 parent 6f225ee commit 475d320

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/coverage-refresh.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ jobs:
3434
git config user.name "mfc-bot"
3535
git config user.email "mfc-bot@users.noreply.github.com"
3636
git add tests/coverage_map.json.gz
37-
git commit -m "test: refresh coverage map [skip ci]"
37+
# --no-verify: this bot commit stages only the binary coverage map; it
38+
# must not run the repo pre-commit hook (./mfc.sh precheck/spelling),
39+
# which is for source changes and aborts the commit on the runner.
40+
git commit --no-verify -m "test: refresh coverage map [skip ci]"
3841
# Push to protected master via CACHE_PUSH_TOKEN (a PAT/App token with
3942
# contents:write + branch-protection bypass), mirroring deploy-tap.yml's
4043
# x-access-token push. The default GITHUB_TOKEN is rejected by protection.

toolchain/mfc/test/test.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,18 @@ def test():
230230
if ARG("build_coverage_map"):
231231
from .coverage_build import build_coverage_map
232232

233-
all_cases = [b.to_case() for b in cases]
233+
# Convergence tests are order-of-accuracy checks driven by convergence.py,
234+
# which fills in grid resolution and patch geometry per refinement level at
235+
# runtime. Their base params are skeletons (m=n=p=0, no geometry) that cannot
236+
# run standalone, so the direct-invocation collector cannot map them. Exclude
237+
# them: absent from the map, select_tests conservatively always-runs them
238+
# (rung 5), which is the desired behavior for convergence checks anyway.
239+
convergence = [b for b in cases if getattr(b, "kind", "golden") == "convergence"]
240+
coverage_cases = [b for b in cases if getattr(b, "kind", "golden") != "convergence"]
241+
if convergence:
242+
cons.print(f"[yellow]Excluding {len(convergence)} convergence tests from the coverage map (always-run by design).[/yellow]")
243+
244+
all_cases = [b.to_case() for b in coverage_cases]
234245
unique = set()
235246
for case, code in itertools.product(all_cases, [PRE_PROCESS, SIMULATION, POST_PROCESS]):
236247
slug = code.get_slug(case.to_input_file())

0 commit comments

Comments
 (0)