Overview
Current test coverage is at 64.55%, which is below our target of 70%. The deployment workflow threshold was temporarily lowered to 60% to unblock deployments. This issue tracks the work needed to improve coverage and restore the proper quality gate.
Background
- Commits: 91b31d3, e9fe543
- Previous Coverage: 44% (only 376/878 tests were running due to marker filter)
- Current Coverage: 64.55% (all 878 tests now running)
- Target Coverage: 70%
- Gap: 5.45% additional coverage needed
Low Coverage Areas
Based on the latest coverage report, these modules need additional tests:
Critical (0-20% coverage)
coaching/src/scripts/seed_coaching_topics.py - 0%
coaching/src/scripts/seed_topics.py - 0%
coaching/src/scripts/verify_coaching_topics.py - 0%
coaching/src/services/model_config_service.py - 15%
coaching/src/services/llm_service_adapter.py - 20%
coaching/src/workflows/orchestrator.py - 23%
Medium Priority (30-60% coverage)
coaching/src/services/cache_service.py - 33%
coaching/src/repositories/conversation_repository.py - 43%
coaching/src/services/prompt_service.py - 66%
coaching/src/workflows/analysis_workflow.py - 69%
Tasks
Acceptance Criteria
Implementation Notes
Scripts Coverage
Scripts in coaching/src/scripts/ are currently untested but contain important logic. Consider:
- Creating fixtures for database/S3 mocking
- Testing seed data generation
- Testing validation logic
Service Layer Coverage
Focus on:
- Happy path scenarios
- Error handling
- Edge cases (empty inputs, missing data)
- Integration points (mocking external dependencies)
Workflow Coverage
- Test state transitions
- Test error handling in nodes
- Mock LLM responses appropriately
Related Files
.github/workflows/deploy-dev.yml - Deployment workflow with coverage threshold
.github/workflows/ci.yml - CI workflow
coaching/tests/unit/ - Unit test directory
Priority
High - This blocks us from enforcing proper quality gates on deployments. While deployments are working, we need to restore the 70% threshold to maintain code quality standards.
Labels
enhancement, testing, technical-debt, quality
Note: The temporary 60% threshold was set in commit 91b31d3 to unblock deployment after fixing MyPy errors. This should be considered a temporary measure.
Overview
Current test coverage is at 64.55%, which is below our target of 70%. The deployment workflow threshold was temporarily lowered to 60% to unblock deployments. This issue tracks the work needed to improve coverage and restore the proper quality gate.
Background
Low Coverage Areas
Based on the latest coverage report, these modules need additional tests:
Critical (0-20% coverage)
coaching/src/scripts/seed_coaching_topics.py- 0%coaching/src/scripts/seed_topics.py- 0%coaching/src/scripts/verify_coaching_topics.py- 0%coaching/src/services/model_config_service.py- 15%coaching/src/services/llm_service_adapter.py- 20%coaching/src/workflows/orchestrator.py- 23%Medium Priority (30-60% coverage)
coaching/src/services/cache_service.py- 33%coaching/src/repositories/conversation_repository.py- 43%coaching/src/services/prompt_service.py- 66%coaching/src/workflows/analysis_workflow.py- 69%Tasks
Acceptance Criteria
--cov-fail-under=70Implementation Notes
Scripts Coverage
Scripts in
coaching/src/scripts/are currently untested but contain important logic. Consider:Service Layer Coverage
Focus on:
Workflow Coverage
Related Files
.github/workflows/deploy-dev.yml- Deployment workflow with coverage threshold.github/workflows/ci.yml- CI workflowcoaching/tests/unit/- Unit test directoryPriority
High - This blocks us from enforcing proper quality gates on deployments. While deployments are working, we need to restore the 70% threshold to maintain code quality standards.
Labels
enhancement, testing, technical-debt, quality
Note: The temporary 60% threshold was set in commit 91b31d3 to unblock deployment after fixing MyPy errors. This should be considered a temporary measure.