Skip to content

[Quality gate] Make JaCoCo fail closed when production class selection is empty #162

Description

@seonghobae

Buyer / acquisition risk

Protected develop@622e5e6c3d534f230c390f10e3832efadfc01825 has a durable-job JaCoCo control that can analyze zero production classes and still report every zero-missed coverage check as satisfied. A vacuous bundle is not 100% owned-production coverage and cannot support acquisition/release claims.

Protected-baseline reproduction

The defect has been reproduced on multiple direct-develop PR integration trees. Representative CI logs include:

--- jacoco:0.8.15:report (report-durable-job-coverage) @ etl-service ---
Analyzed bundle 'etl-service' with 0 classes

--- jacoco:0.8.15:check (check-durable-job-coverage) @ etl-service ---
All coverage checks have been met.

Real ETL tests execute before this output, so the defect is the shared coverage selector/control rather than an empty test suite.

Root cause

Protected etl-service/pom.xml historically reused dotted class-name patterns at plugin level:

<includes>
    <include>com.xtrmetl.etl.job.*</include>
    <include>com.xtrmetl.etl.controller.EtlJobController*</include>
</includes>

JaCoCo prepare-agent accepts class-name expressions, while Maven report/check filter compiled class files. Reusing one selector across those goals can leave report/check with an empty class-file set. The control then had no non-empty bundle invariant, so an empty selection satisfied every MISSEDCOUNT <= 0 rule vacuously.

Selected remedy

PR #164 (fix/nonvacuous-jacoco-coverage) is the active direct-develop remediation. Exact current source head:

bae782c0406bec4258ceadb04251f385980cb99f

It:

  • removes the incompatible shared plugin-level selector;
  • uses class-file filters on report-durable-job-coverage and check-durable-job-coverage;
  • preserves exact zero-missed INSTRUCTION, LINE, METHOD, and BRANCH limits; and
  • adds a BUNDLE CLASS / TOTALCOUNT / minimum 1 invariant so an empty selected production set fails closed.

Current GREEN evidence — integration tree, not literal source

CI run 31327458876, job 93279988858, checked out GitHub PR synthetic merge 32c6b234731dde8f7d91ddb577ffb947becf0666 for #164. The full Maven reactor reached the repaired JaCoCo boundary. Both report and check logged:

Analyzed bundle 'etl-service' with 8 classes

The selected eight production classes then reported 100.0% instruction, line, branch, method, and class coverage, and the BUNDLE non-empty invariant passed. This is direct A/B evidence that #164 changes the causal quality-gate boundary from a zero-class false green to a real selected production bundle without weakening zero-missed thresholds.

The same job proves the current hosted PR workflow source identity is synthetic merge (refs/pull/164/merge), not literal source head. Therefore this GREEN is merged-tree compatibility/coverage evidence, not accepted literal-source evidence under mightyETL's exact-source governance.

Remaining acceptance

Keep this issue open and PR #164 Draft. Close only after the integrated protected quality control proves all of the following on accepted source identity:

  1. the selected production class set is non-empty before percentage/zero-missed thresholds are considered;
  2. the intended class-file filters select real compiled production classes;
  3. exact zero missed instruction, line, method, and branch counters hold for that selected set;
  4. full supported-host Maven tests succeed;
  5. Dependency Review, SBOM, SAST and hard Security Scan succeed on the unchanged accepted revision;
  6. canonical docs/TEST_STRATEGY.md, traceability, doctoring and CHANGELOG state that Analyzed bundle with 0 classes is a control failure, not 100% coverage;
  7. valid review findings are resolved and qualifying independent non-author approval exists where governance requires it; and
  8. protected acceptance distinguishes literal source evidence from GitHub synthetic PR merge evidence.

Do not close this issue merely because #164's POM or synthetic merged tree looks correct. The protected baseline remains a known_gap until #164 or an equivalent repair integrates and protected acceptance is regenerated.

Primary JaCoCo references

JaCoCo. (2026). jacoco:prepare-agent. https://www.jacoco.org/jacoco/trunk/doc/prepare-agent-mojo.html

JaCoCo. (2026). jacoco:report. https://www.jacoco.org/jacoco/trunk/doc/report-mojo.html

JaCoCo. (2026). jacoco:check. https://www.jacoco.org/jacoco/trunk/doc/check-mojo.html

JaCoCo. (2026). CoverageTransformer.java. https://www.jacoco.org/jacoco/trunk/coverage/org.jacoco.agent.rt/org.jacoco.agent.rt.internal/CoverageTransformer.java.html

JaCoCo. (2026). ReportSupport.java. https://www.jacoco.org/jacoco/trunk/coverage/jacoco-maven-plugin/org.jacoco.maven/ReportSupport.java.html

JaCoCo. (2026). FileFilter.java. https://www.jacoco.org/jacoco/trunk/coverage/jacoco-maven-plugin/org.jacoco.maven/FileFilter.java.html

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: authAuthentication, authorization, identity, or tenant isolationarea: ci-cdCI, GitHub Actions, checks, release, or supply chainarea: dependenciesDependency or lockfile maintenancearea: securitySecurity boundary, hardening, or vulnerability preventionbugSomething isn't workingpriority: mediumNormal-priority or P2 workstatus: triagedOpen issue has an organization taxonomy assignmenttype: featureNew or expanded product capability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions