fix(tooling): restore Fallow function coverage#255
Merged
Conversation
DavidBabinec
marked this pull request as ready for review
July 24, 2026 13:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
fnMap/fentries from the TypeScript source AST when Bun LCOV omits per-functionFN/FNDArecordsDAstatement/line coverage and emit full source ranges for inferred functionsWhy
Bun writes
FNF/FNHaggregate totals andDAline hits, but no individual function records. The previous converter therefore generated 0 functions, so Fallow matched 0 of 28,000+ analyzed functions and fell back to estimated coverage for every CRAP score.Impact
A fresh run now emits 12,966 Istanbul functions across 1,524 covered files. Fallow 3.9.1 directly matches 9,619 analyzed source functions instead of 0; files absent from Bun coverage continue to use Fallow's normal estimate.
Verification
bun test scripts/lcov-to-istanbul.test.ts(3 pass)bun run test:coverage(6,257 pass; converter emitted 1,524 files / 12,966 functions)npx fallow health --coverage .coverage/coverage-final.json --format json --quiet --top 1(coverage_model: istanbul,istanbul_matched: 9619)bun run lintbun run build