ci(coverage): parse lcov instead of forge's ASCII table#51
Draft
rubydusa wants to merge 1 commit into
Draft
Conversation
Switch `forge coverage` to `--report lcov` and parse the lcov output in `extract-summary.sh`. lcov is a stable, well-documented format; forge's ASCII table changes across versions and was a latent breakage risk for every consumer repo. Trade-offs: - Drops the separate "Statements" metric — lcov has no equivalent. `stmts_pct` output is set equal to `lines_pct` for back-compat with callers (e.g. `check-threshold.sh`). - Replaces `coverage-source-filter` (grep substring) with `coverage-source-prefix` (path prefix on lcov SF: records). Replaces the box-drawing-character fixture with a minimal lcov fixture covering the same shape. Adds two new test cases: empty-filter and missing-lcov. Closes #44
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.
Closes #44.
Summary
Switch `forge coverage` to `--report lcov` and parse lcov in `extract-summary.sh`. lcov is a stable, well-documented format; forge's ASCII table changes across versions and was a latent breakage risk for every consumer repo.
Trade-offs
Files
Test plan
Note on rollout order
This is the most behavior-changing PR of the five. If we land #45 (SHA pin) and #50 (foundry-version=stable) first, this PR runs against a known-good Foundry version and the lcov format is locked.
🤖 Generated with Claude Code