Skip to content

fix(tools): report uncovered functions in coverage:analyze, matching CI - #301

Merged
Shinrai merged 2 commits into
nextfrom
fix/coverage-analyze-functions
Aug 20, 2026
Merged

fix(tools): report uncovered functions in coverage:analyze, matching CI#301
Shinrai merged 2 commits into
nextfrom
fix/coverage-analyze-functions

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

No new features

🐛 Bug Fixes

📦 Dependencies

No dependency updates

🔧 Other Changes

👥 Contributors

analyze-coverage.mjs only walked the statement (`s`) and branch (`b`) maps, so
it was blind to a never-called function whose body carries no statements of its
own — e.g. an empty `() => {}` callback. v8's `f`/`fnMap` is the only signal for
that case, and CI's coverage-summary.json counts it, so the local report read
"all clear" while the badge showed <100% functions. Add a functions pass that
reports each uncovered function (name + declaration line + context), and update
the summary wording to cover statements, branches, and functions.
@cldmv-bot cldmv-bot Bot added ! fix → next v4 flow: fix contributor PR targeting the next integration branch area: tests Touches test files, fixtures, or test infrastructure labels Aug 20, 2026
…ze catch

The empty `.catch(() => {})` at unified-wrapper.mjs:3417 (getTrap's background
materialization kick-off) was the one uncovered function repo-wide — its
statement runs, but no test made that background `_materialize()` reject, so
the callback never fired. It is reachable: construct a lazy wrapper whose
materializeFunc rejects, read a plain property to trigger the getTrap branch,
and assert the rejection is swallowed (no unhandledRejection leaks) rather than
surfacing — the exact contract that catch provides. Brings functions coverage
to 100% alongside the existing 100% statements/branches/lines.
@Shinrai
Shinrai force-pushed the fix/coverage-analyze-functions branch from 36ed4fc to 0dd03b7 Compare August 20, 2026 23:52
@Shinrai
Shinrai merged commit 6fe7eee into next Aug 20, 2026
20 checks passed
@cldmv-bot
cldmv-bot Bot deleted the fix/coverage-analyze-functions branch August 20, 2026 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Touches test files, fixtures, or test infrastructure ! fix → next v4 flow: fix contributor PR targeting the next integration branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant