build(coverage): gate aggregate coverage against a non-regression ratchet#400
Merged
Conversation
…chet The graph-compose-coverage module produced a cross-module JaCoCo aggregate report but enforced no threshold, so coverage could silently decline. Add a non-regression ratchet on the aggregate (core + render-pdf + templates, counting the qa cross-module exec). JaCoCo has no native aggregate-check goal, so the check reproduces the aggregate inputs: unpack the measured modules' classes, merge their execs, and run jacoco:check on the combined BUNDLE for INSTRUCTION and BRANCH covered-ratio. The floors (0.875 / 0.68) sit just below the current baseline (0.87857 / 0.68310, identical on Windows and CI Linux), leaving only rounding and cross-platform headroom. The check runs in the existing build-and-test verify step, which feeds the required CI Gate, so a coverage regression fails the PR with no new CI job.
c6d8759 to
5f4efff
Compare
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.
Why
The
graph-compose-coveragemodule builds a cross-module JaCoCo aggregate report (core + render-pdf + templates, counting thegraph-compose-qacross-module exec) but enforces no threshold, so aggregate coverage could silently decline release-over-release.What
coverage/pom.xmlwith floorscoverage.min.instruction=0.875andcoverage.min.branch=0.68— ~0.36 pp / ~0.31 pp below the baseline, only rounding/variance headroom.maven-dependency-pluginunpacks the measured modules' classes →jacoco:mergecombines the four execs →jacoco:checkon the combined BUNDLE (INSTRUCTION + BRANCH covered-ratio,haltOnFailure). Same classes and execs as the existingreport-aggregate, so the enforced numbers match the published report.coverage/pom.xmland.github/workflows/ci.yml.Enforcement is automatic: the check runs in the existing
build-and-testverifystep, which feeds the requiredCI Gate— a coverage regression fails the PR with no new CI job.Tests
clean verify -pl :graph-compose-core,:graph-compose-render-pdf,:graph-compose-templates,:graph-compose-qa,:graph-compose-coverage -am→ the aggregate check analyzes 671 classes, reports "All coverage checks have been met.", BUILD SUCCESS.jacoco:check@check-aggregate -Dcoverage.min.instruction=0.90→ BUILD FAILURE ("instructions covered ratio is 0.87, but expected minimum is 0.90"). The override was a temporary-D; nothing committed to revert.