Skip to content

Commit 2be4b64

Browse files
Merge branch 'master' into local-aware-ibm
2 parents 0f99b69 + 47b56e8 commit 2be4b64

3 files changed

Lines changed: 27 additions & 6 deletions

File tree

.github/workflows/coverage-refresh.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,13 @@ jobs:
2222
group: phoenix
2323
labels: gt
2424
steps:
25+
# persist-credentials: false stops actions/checkout from configuring the
26+
# default GITHUB_TOKEN as an http.extraheader, which otherwise OVERRIDES the
27+
# token embedded in the push URL below — making the push authenticate as
28+
# github-actions[bot] (which cannot bypass the require-PR rule) instead of
29+
# the CACHE_PUSH_TOKEN identity.
2530
- uses: actions/checkout@v4
26-
with: { clean: false }
31+
with: { clean: false, persist-credentials: false }
2732
- name: Build + collect coverage map (SLURM)
2833
run: bash .github/scripts/submit-slurm-job.sh .github/workflows/common/coverage-refresh.sh cpu none phoenix
2934
- name: Commit refreshed map
@@ -34,10 +39,15 @@ jobs:
3439
git config user.name "mfc-bot"
3540
git config user.email "mfc-bot@users.noreply.github.com"
3641
git add tests/coverage_map.json.gz
37-
git commit -m "test: refresh coverage map [skip ci]"
38-
# Push to protected master via CACHE_PUSH_TOKEN (a PAT/App token with
39-
# contents:write + branch-protection bypass), mirroring deploy-tap.yml's
40-
# x-access-token push. The default GITHUB_TOKEN is rejected by protection.
42+
# --no-verify: this bot commit stages only the binary coverage map; it
43+
# must not run the repo pre-commit hook (./mfc.sh precheck/spelling),
44+
# which is for source changes and aborts the commit on the runner.
45+
git commit --no-verify -m "test: refresh coverage map [skip ci]"
46+
# Push to master with CACHE_PUSH_TOKEN, a classic PAT from an org-owner
47+
# account. GitHub Apps cannot bypass the require-PR ruleset rule for
48+
# direct pushes, but a PAT authenticates as the user (OrganizationAdmin),
49+
# which IS an honored bypass actor. persist-credentials:false above
50+
# ensures this token is actually used for the push.
4151
git push "https://x-access-token:${CACHE_PUSH_TOKEN}@github.com/MFlowCode/MFC.git" HEAD:master
4252
else
4353
echo "Coverage map unchanged."

tests/coverage_map.json.gz

334 Bytes
Binary file not shown.

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)