Skip to content

record/coverage [20260422-192751]#4

Closed
rnagulapalle wants to merge 2 commits intomainfrom
record/coverage-20260422-192751
Closed

record/coverage [20260422-192751]#4
rnagulapalle wants to merge 2 commits intomainfrom
record/coverage-20260422-192751

Conversation

@rnagulapalle
Copy link
Copy Markdown
Contributor

No description provided.

@rnagulapalle
Copy link
Copy Markdown
Contributor Author

I traced this failure to the coverage gate, not to a functional test regression.

Diagnosis

  • fetch_ci_log for job 72574000153 shows JaCoCo failing during mvn -B verify with: lines covered ratio is 0.40, but expected minimum is 0.80.
  • get_pr_diff shows this PR adds two new methods in src/main/java/com/phalanx/calc/MathOps.java: percentage(...) and average(...).
  • read_file on src/test/java/com/phalanx/calc/MathOpsTest.java showed the test suite still only covered add/subtract/multiply/divide, so the new lines introduced by this PR were untested.
  • git_blame confirms the uncovered lines were introduced in this PR's head commit, so this is PR-local rather than a preexisting main-branch issue.

What I changed

I added focused JUnit coverage for the new methods in src/test/java/com/phalanx/calc/MathOpsTest.java, including:

  • normal percentage cases
  • percentage(..., 0) exception behavior
  • normal average cases
  • empty-array exception behavior

Verification

I had the coder subagent apply only that test-file change and re-run the original failing command exactly:

mvn -B verify

That command now passes, and JaCoCo reports All coverage checks have been met.

I’m pushing the verified fix to your PR branch now.

The PR added percentage() and average() to MathOps, but the existing
JUnit suite only exercised add/subtract/multiply/divide. JaCoCo failed
mvn -B verify because bundle line coverage fell below the 0.80 gate.

Add targeted tests for the new methods, including both happy paths and
exception paths, so the original coverage check passes under the same
verification command.
@rnagulapalle rnagulapalle deleted the record/coverage-20260422-192751 branch April 22, 2026 19:31
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.

1 participant