Skip to content

fix(ci): coverage workflow globbed a flat tests/unit that no longer exists - #980

Merged
Chemaclass merged 2 commits into
mainfrom
fix/coverage-workflow-stale-test-paths
Aug 7, 2026
Merged

Chemaclass merged 2 commits into
mainfrom
fix/coverage-workflow-stale-test-paths

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

The nightly coverage run has failed every night since 2026-08-02.

ls: cannot access 'tests/unit/*_test.sh': No such file or directory
##[error]Process completed with exit code 1

Its file list came from ls tests/unit/*_test.sh, and #960 moved every unit test into a per-module subdirectory. The glob matched nothing, ls exited non-zero, the step died under bash -e. Nobody noticed because this workflow is deliberately non-blocking — it never runs on push or pull_request, so a red nightly isn't a status check on anything.

🐛 Two stale paths — the second is the one that mattered

The exclusion grep -v '/coverage_' was written for flat filenames; the coverage engine's meta-tests are now tests/unit/coverage/. Fixing only the glob would have restored the run while silently pulling those meta-tests back in — and the workflow's own comment explains why they're excluded: measuring them under --coverage double-instruments src/coverage/ and corrupts their assertions.

Both are now one find with explicit exclusions for coverage/ and fixtures/. That also picks up two files a two-level glob would still have missed.

65 files selected — 76 total, minus 9 meta-tests, minus 2 fixtures. Smoke-tested against a real --coverage run that writes lcov.

🧪 The contract test is the point

It existed already and didn't catch this, because it only looked at tests.yml. #972 fixed the instance; I didn't go looking for the class. It now checks every workflow, for any shape: a tests/ path or glob a workflow names must resolve to something. Mutation-tested against both files.

Two bugs in that test, worth recording:

  • It documented stripping comments and didn't, so the broken globs the workflows describe in prose read as live references
  • An unanchored tests/ matched the tail of sample_tests/pass_test.sh — a file test-action.yml writes at runtime — and reported it missing

✅ Verification

make sa · make lint · bash build.sh bin -v → ✅ Build verified ✅ · 1658 sequential / 1617 parallel-simple-strict.

…xists

The nightly coverage run has failed every night since 2026-08-02. Its file list
came from `ls tests/unit/*_test.sh`, and #960 moved every unit test into a
per-module subdirectory, so the glob matched nothing, `ls` exited non-zero and
the step died under `bash -e`. Nobody noticed because this workflow is
deliberately non-blocking: it never runs on push or pull_request, so a red
nightly is not a status check on anything.

There were two stale paths, and the second is the one that mattered. The
exclusion `grep -v '/coverage_'` was written for flat filenames; the coverage
engine's meta-tests are now tests/unit/coverage/. Fixing only the glob would
have restored the run while silently pulling those meta-tests back in -- and the
workflow's own comment explains why they are excluded: measuring them under
--coverage double-instruments src/coverage/ and corrupts their assertions.

Both are now one `find` with explicit exclusions for coverage/ and fixtures/.
That also picks up two files a two-level glob would still have missed. 65 files
selected, from 76 total minus 9 meta-tests and 2 fixtures; smoke-tested against
a real --coverage run that writes lcov.

The contract test is the point of this change. It existed already and did not
catch this, because it only looked at tests.yml -- #972 fixed the instance and I
did not go looking for the class. It now checks every workflow, for any shape:
a tests/ path or glob a workflow names must resolve to something. Mutation-
tested against both files.

Two bugs in that test worth recording. It documented stripping comments and did
not, so the broken globs the workflows describe in prose read as live
references. And an unanchored `tests/` matched the tail of
`sample_tests/pass_test.sh`, a file test-action.yml writes at runtime, reporting
it missing. Both fixed; the match is anchored on a boundary now.
@Chemaclass Chemaclass added the bug Something isn't working label Aug 6, 2026
@Chemaclass Chemaclass self-assigned this Aug 6, 2026
@Chemaclass
Chemaclass merged commit 2a0f01f into main Aug 7, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the fix/coverage-workflow-stale-test-paths branch August 7, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant