Skip to content

Fix #85: Add test_coverage configuration to exclude test support modules#89

Merged
andreasronge merged 1 commit intomainfrom
claude/issue-85-improve-coverage
Dec 3, 2025
Merged

Fix #85: Add test_coverage configuration to exclude test support modules#89
andreasronge merged 1 commit intomainfrom
claude/issue-85-improve-coverage

Conversation

@andreasronge
Copy link
Copy Markdown
Owner

Summary

Adds test_coverage configuration to mix.exs to exclude test support modules from coverage calculation.

Changes

  • Added test_coverage configuration with ignore_modules to exclude PtcRunner.TestSupport.LLMClient
  • This module is test infrastructure, not production code, and was incorrectly being counted as uncovered

Coverage Results

  • Before: 88.34% overall
  • After: 91.60% overall ✅
  • Target achieved: 90%+

All modules now have excellent coverage:

  • Parser: 100%
  • Context: 100%
  • Interpreter: 100%
  • Operations: 90.83%
  • Sandbox: 91.67%
  • Schema: 94.12%
  • Validator: 86.81% (remaining gap is due to dead code paths in Validator that are bypassed by custom validators)

Verification

  • All 512 tests pass
  • mix precommit passes (format, compile, credo, tests)

Excludes PtcRunner.TestSupport.LLMClient from coverage calculation, which was
previously counted as uncovered production code despite being test infrastructure.

This brings test coverage from 88.34% to 91.60%, exceeding the 90% target.

Fixes #85

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 3, 2025

PR Review: Add test_coverage configuration to exclude test support modules

Summary

This PR adds test_coverage configuration to mix.exs to exclude PtcRunner.TestSupport.LLMClient from coverage calculation. This is a simple, correct fix that properly excludes test infrastructure from production code coverage metrics.

What's Good

  • Correctly identifies the issue: test support module was being counted as uncovered production code
  • Uses the proper Mix configuration option (ignore_modules)
  • Coverage now correctly reflects actual production code: 91.60% (exceeds 90% target)
  • Change is minimal and focused - only adds necessary configuration

Issues (Must Fix)

None. The implementation is correct and complete.

Suggestions (Optional)

None. The change is appropriately scoped.

Security

No concerns. This is a test configuration change with no runtime impact.

Verification Performed

  • Confirmed PtcRunner.TestSupport.LLMClient is the only module in test/support/
  • Verified the module is legitimately test infrastructure (LLM client for E2E testing)
  • Ran mix test --cover - all 512 tests pass, coverage shows 91.60%
  • Confirmed ignore_modules is the correct Mix configuration option per mix help test

Verdict

Approve - Clean, correct implementation that fixes the coverage calculation issue.

@github-actions github-actions bot added the auto-triage-pending Auto-triage in progress label Dec 3, 2025
@andreasronge
Copy link
Copy Markdown
Owner Author

Auto-Triage Summary

Review Analysis

The PR review provided a clean approval with:

  • Issues (Must Fix): None
  • Suggestions (Optional): None
  • Security Concerns: None

Decisions Made

# Issue Decision Action
- No issues identified N/A No action needed

Status

  • FIX_NOW items: 0
  • Issues created: 0
  • Items ignored: 0

Conclusion

✅ The PR has been approved with no required changes. The implementation correctly excludes test support modules from coverage calculation, raising production code coverage to 91.60%.

Adding ready-to-merge label - auto-merge will handle the merge once all checks pass.

@andreasronge andreasronge added the ready-to-merge PR is ready to be merged label Dec 3, 2025
@github-actions github-actions bot added auto-triage-cycle-1 Auto-triage cycle 1 auto-triage-complete Auto-triage completed and removed auto-triage-pending Auto-triage in progress labels Dec 3, 2025
@andreasronge andreasronge enabled auto-merge (squash) December 3, 2025 08:01
@andreasronge andreasronge merged commit 5765732 into main Dec 3, 2025
3 checks passed
@andreasronge andreasronge deleted the claude/issue-85-improve-coverage branch December 3, 2025 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-triage-complete Auto-triage completed auto-triage-cycle-1 Auto-triage cycle 1 ready-to-merge PR is ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant