Background
pom.xml enforces a whole-project JaCoCo floor of 50% line / 30% branch coverage, explicitly commented as "set just below current levels (line ~53%, branch ~34%); raising these as coverage improves is a follow-up."
Impact
- The quality gate passes with roughly half the code untested.
- Key RAG paths (retrieval filtering, token tracking, provider factories, error branches) may be under-tested without anyone noticing.
- Codecov/SonarCloud badges imply higher coverage than the gate actually enforces.
How to reproduce
- Run
mvn jacoco:check — passes at the 50%/30% floor.
- Delete a test exercising a covered branch and re-run — still passes until coverage dips below the floor.
Where the fix should land
Raise the floor incrementally as coverage improves:
- Measure current coverage (
mvn clean test jacoco:report).
- Raise the BUNDLE limits in
pom.xml in steps (e.g. 0.55/0.35, then 0.60/0.40) rather than one big jump.
- Add focused unit tests for under-covered classes (
TokenUsageTracker, MetricsService, VectorRepositoryFactory, provider error paths) to keep pace with each raised floor.
Files touched
pom.xml (JaCoCo configuration/rules)
- New/updated tests under
src/test/java/...
Acceptance criteria
Background
pom.xmlenforces a whole-project JaCoCo floor of 50% line / 30% branch coverage, explicitly commented as "set just below current levels (line ~53%, branch ~34%); raising these as coverage improves is a follow-up."Impact
How to reproduce
mvn jacoco:check— passes at the 50%/30% floor.Where the fix should land
Raise the floor incrementally as coverage improves:
mvn clean test jacoco:report).pom.xmlin steps (e.g. 0.55/0.35, then 0.60/0.40) rather than one big jump.TokenUsageTracker,MetricsService,VectorRepositoryFactory, provider error paths) to keep pace with each raised floor.Files touched
pom.xml(JaCoCoconfiguration/rules)src/test/java/...Acceptance criteria
code-coveragejob stays green.