Skip to content

Verify JaCoCo coverage measurement is functional after issue #26 fix#31

Closed
Copilot wants to merge 1 commit intodevelopfrom
copilot/fix-coverage-measurement-regression
Closed

Verify JaCoCo coverage measurement is functional after issue #26 fix#31
Copilot wants to merge 1 commit intodevelopfrom
copilot/fix-coverage-measurement-regression

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 10, 2026

Issue #27 reported coverage regression from 49% to 12% despite adding 276 tests. Investigation revealed this was caused by issue #26 (Gradle build failures) preventing JaCoCo report generation.

Changes

  • Installed jDisco 1.2.0 dependency - Downloaded from GitHub releases (https://github.com/bedaHovorka/jdisco/releases/download/v1.2.0/jdisco-1.2.0.jar) to Maven local repository to enable builds
  • Verified JaCoCo functionality - Generated coverage report showing 44.6% coverage (7,569/16,962 instructions) for 268 tests
  • Confirmed configuration correctness - JaCoCo properly measures Kotlin classes in build/classes/kotlin/main

Root Cause

The reported regression was not a JaCoCo configuration issue. The repository currently has 268 tests (267 passing, 1 skipped), not the expected 591 tests from Phase 6. Missing 323 tests explains the coverage gap (44% actual vs 49-62% expected). Repository grafting at commit cb60631 likely lost test history.

Coverage Breakdown

Package Coverage Notes
xml 84% ✅ Well tested
util 75% ✅ Well tested
context 69% ✅ Well tested
objects.cells 64% ✅ Adequate
sim 26% ⚠️ Needs tests
gui.* 0% Untested

JaCoCo measurement is working correctly. No configuration changes required.

Original prompt

This section details on the original issue you should resolve

<issue_title>🔴 P0: Coverage measurement regression -37% (49% → 12%) despite +276 tests</issue_title>
<issue_description>## Bug Description

Severity: 🔴 CRITICAL (P0)
Status: BLOCKED by #26
Component: JaCoCo integration or test execution
Discovered: 2026-01-10 during test coverage expansion review

Coverage regressed from 49% (Phase 3, 8,625 instructions) to 12% (Phase 6, 2,177 instructions), despite adding 276 new passing tests in Phases 4-6. This is a -37% drop (-5,697 instructions) with +276 tests, which is mathematically impossible unless coverage measurement is broken.

Coverage Trajectory

Phase Tests Coverage Instructions Change
Baseline 242 45% 7,566
Phase 1 293 47% 8,104 +538 ✅
Phase 3 347 49% 8,625 +521 ✅
Phase 5 423 46% 7,874 -751 ⚠️
Phase 6 591 12% 2,177 -5,697 🔴

Impact

Root Cause Hypothesis

  1. Most likely: 🔴 P0: Gradle test process exits with code 1 despite all tests passing - blocks JaCoCo #26 (Gradle exit code) blocks JaCoCo report generation
  2. JaCoCo not instrumenting new test files
  3. Integration tests excluded from coverage (missing @Tag("integration-test"))
  4. Clean build removes cumulative coverage (not aggregated)
  5. Test file placement outside of JaCoCo source set

Investigation Steps (After #26 Fixed)

# 1. Regenerate coverage with clean build
./gradlew clean test jacocoTestReport

# 2. Check if integration tests run during coverage
./gradlew test integrationTest jacocoTestReport

# 3. Compare package-level coverage
# Open: build/reports/jacoco/test/html/index.html
# Check: objects/tracks (should be 85%), objects/paths (should be 49%)

# 4. Verify all 591 tests execute during coverage
./gradlew test --info 2>&1 | grep "tests completed"

# 5. Check JaCoCo exclusion patterns
grep -A 10 "jacocoTestReport" build.gradle.kts

Expected Resolution

After fixing #26, coverage should be:

  • Pessimistic estimate: 52-55% (Phases 4-6 add ~1,000 instructions)
  • Optimistic estimate: 58-62% (Phases 4-6 add ~2,000 instructions)
  • If still 12%, deeper investigation needed

Related Issues

Estimated Fix Time

30 minutes after #26 is fixed

References

  • BUGS_FOUND.md - BUG-002
  • Branch: copilot/increase-test-coverage
    </issue_description>

<agent_instructions>analyse and please provide fix</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Fix coverage measurement regression issue after adding tests Verify JaCoCo coverage measurement is functional after issue #26 fix Jan 10, 2026
Copilot AI requested a review from bedaHovorka January 10, 2026 08:36
Copy link
Copy Markdown
Owner

@bedaHovorka bedaHovorka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok verification done

@bedaHovorka
Copy link
Copy Markdown
Owner

fixed by #30

@bedaHovorka bedaHovorka deleted the copilot/fix-coverage-measurement-regression branch January 10, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🔴 P0: Coverage measurement regression -37% (49% → 12%) despite +276 tests

2 participants