Skip to content

fix: measure coverage against a src-preserving build, not the dist-only one - #166

Merged
Shinrai merged 1 commit into
nextfrom
fix/coverage-build-preserve-src
Jul 28, 2026
Merged

Shinrai merged 1 commit into
nextfrom
fix/coverage-build-preserve-src

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

No new features

🐛 Bug Fixes

  • fix: measure coverage against a src-preserving build, not the dist-only one (658761a)

📦 Dependencies

No dependency updates

🔧 Other Changes

No other changes

👥 Contributors

…ly one

The coverage-badge and coverage-pr-comment legs ran the caller's `build_command`
before the coverage run. For src/dist-split repos that command is
`npm run build:ci`, which ends with `ci:cleanup-src` and DELETES `src/` — so the
subsequent coverage run (coverage.include `src/**`) measured a now-absent tree,
produced empty coverage, and crashed the @cldmv/vitest-runner summary
(`pct.toFixed is not a function`). Red on every master push; the badge went
stale. The matrix-test legs legitimately want the dist-only cleanup.

Add a separate `coverage_build_command` input (default `npm run build`, which
preserves `src/`) to both coverage reusables and thread it through
workflow-ci.yml. The coverage Build step uses it, falling back to `build_command`
only when it's explicitly emptied — so the fix applies by default on a `@v4`
bump, is decoupled from the matrix build, and stays overridable.

(The upstream guard so a coverage misconfig degrades instead of crashing —
colourPct/printCoverageSummary tolerating a non-numeric pct — belongs in
@cldmv/vitest-runner and is flagged separately.)
@cldmv-bot cldmv-bot Bot added ! fix → next v4 flow: fix contributor PR targeting the next integration branch type: ci Changes to CI workflows, actions, or build pipelines labels Jul 28, 2026
@Shinrai
Shinrai merged commit 335ead5 into next Jul 28, 2026
16 checks passed
@cldmv-bot
cldmv-bot Bot deleted the fix/coverage-build-preserve-src branch July 28, 2026 05:55
Shinrai added a commit that referenced this pull request Jul 28, 2026
#169)

## 🚀 What's Changed

### 💥 Breaking Changes
_No breaking changes_

### ✨ Features
_No new features_

### 🐛 Bug Fixes
- #166
- fix: measure coverage against a src-preserving build, not the
dist-only one (658761a)

- #165
- fix: recognize npm's real 'already published' error so publish is
idempotent (fd92652)

- #164
- fix: fail loudly when redirect-hotfix-pr can't run the cherry-pick
path (d3af515)

- #163
- fix: never auto-merge a Dependabot PR onto the release branch
(20bd697)

### 📦 Dependencies
_No dependency updates_

### 🔧 Other Changes
- #168
- docs(changelogs): flesh out v4.10.0 / v4.15.0 / v4.16.0 from commit
diffs (b2e38f6)
  - docs(changelogs): backfill v4.3.0 through v4.16.0 (7dfe488)

- #167
- docs: record why Dependabot subjects stay off the master-audit
allow-list (9ff1016)

- #164
- refactor: centralize release-flow workflows into workflow-*.yml
reusables (67fa2d1)



<details>
<summary>👥 Contributors</summary>

- @Shinrai

</details>

---------

Co-authored-by: Shinrai <[email protected]>
Co-authored-by: Nathaniel H <[email protected]>
Co-authored-by: cldmv-bot[bot] <230771808+cldmv-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

! fix → next v4 flow: fix contributor PR targeting the next integration branch type: ci Changes to CI workflows, actions, or build pipelines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant