Coverage Analysis Report for REQ-172
Generated: 2025-12-07
Crate: radium-core
Tool: cargo-llvm-cov
Test Suite: Library tests only (--lib)
Executive Summaryβ
Current Coverage Metricsβ
| Metric | Current | Target | Gap |
|---|---|---|---|
| Line Coverage | 76.83% | 100% | 23.17% (6,092 uncovered lines) |
| Function Coverage | 72.77% | 100% | 27.23% (892 uncovered functions) |
| Region Coverage | 79.28% | 100% | 20.72% (9,479 uncovered regions) |
Note: The REQ-172 document states 82.58% line coverage, but actual measurement shows 76.83%. This discrepancy may be due to:
- Different test execution scope (library vs integration tests)
- Code changes since last measurement
- Different coverage tool configuration
Test Statisticsβ
- Total Tests: 1,086 passed
- Ignored Tests: 2 (temporarily disabled)
- Failed Tests: 0
Module-Level Coverage Analysisβ
Modules with Low Coverage (<70%)β
These modules require immediate attention:
-
analytics/code_changes.rs - 0.00% coverage
- 48 lines uncovered
- 4 functions uncovered
- Priority: Medium (analytics feature)
-
analytics/storage.rs - 0.00% coverage
- 101 lines uncovered
- 16 functions uncovered
- Priority: Medium (analytics feature)
-
context/metrics.rs - 0.00% coverage
- 90 lines uncovered
- 7 functions uncovered
- Priority: Low (metrics collection)
-
engines/config.rs - 4.92% coverage
- 52 lines uncovered
- 8 functions uncovered
- Priority: Medium (engine configuration)
-
extensions/analytics.rs - 0.00% coverage
- 150 lines uncovered
- 13 functions uncovered
- Priority: Low (extension analytics)
-
extensions/dependency_graph.rs - 0.00% coverage
- 190 lines uncovered
- 20 functions uncovered
- Priority: Medium (dependency resolution)
-
extensions/marketplace.rs - 17.02% coverage
- 121 lines uncovered
- 13 functions uncovered
- Priority: Low (marketplace feature)
-
extensions/publisher.rs - 9.22% coverage
- 70 lines uncovered
- 12 functions uncovered
- Priority: Low (publishing feature)
-
hooks/config.rs - 14.14% coverage
- 67 lines uncovered
- 12 functions uncovered
- Priority: High (hook configuration)
-
hooks/error_hooks.rs - 0.00% coverage
- 94 lines uncovered
- 14 functions uncovered
- Priority: High (error handling hooks)
-
hooks/marketplace.rs - 0.00% coverage
- 32 lines uncovered
- 12 functions uncovered
- Priority: Low (marketplace hooks)
-
hooks/model.rs - 0.00% coverage
- 40 lines uncovered
- 10 functions uncovered
- Priority: High (model hooks)
-
hooks/telemetry.rs - 0.00% coverage
- 13 lines uncovered
- 3 functions uncovered
- Priority: Medium (telemetry hooks)
-
hooks/tool.rs - 0.00% coverage
- 52 lines uncovered
- 12 functions uncovered
- Priority: High (tool hooks)
-
mcp/integration.rs - 5.00% coverage
- 176 lines uncovered
- 33 functions uncovered
- Priority: Medium (MCP integration)
Modules with Medium Coverage (70-90%)β
These modules need improvement to reach 90%+:
- agents/analytics.rs - 61.06% line coverage
- agents/model_selector.rs - 62.76% line coverage
- agents/telemetry.rs - 45.95% line coverage
- agents/validation.rs - 47.90% line coverage
- commands/custom.rs - 60.53% line coverage
- config/cli_config.rs - 62.72% line coverage
- context/sources/braingrid.rs - 32.14% line coverage
- context/sources/jira.rs - 30.30% line coverage
- context/validator.rs - 38.98% line coverage
- engines/providers/claude.rs - 54.65% line coverage
- engines/providers/gemini.rs - 46.15% line coverage
- engines/providers/openai.rs - 46.67% line coverage
- engines/registry.rs - 56.35% line coverage
- extensions/installer.rs - 59.12% line coverage
- extensions/validator.rs - 57.74% line coverage
- hooks/composition.rs - 63.59% line coverage
- hooks/loader.rs - 55.04% line coverage
- hooks/registry.rs - 70.34% line coverage
- hooks/types.rs - 34.09% line coverage
- learning/store.rs - 59.32% line coverage
- mcp/auth.rs - 52.02% line coverage
- mcp/client.rs - 35.99% line coverage
- mcp/content.rs - 58.90% line coverage
- mcp/prompts.rs - 60.36% line coverage
- monitoring/service.rs - 65.05% line coverage
- monitoring/telemetry.rs - 73.43% line coverage
- planning/executor.rs - 54.42% line coverage
- policy/templates.rs - 69.94% line coverage
Modules with High Coverage (90%+)β
These modules are in good shape but may need edge case coverage:
- agents/config.rs - 87.09% line coverage
- agents/discovery.rs - 73.12% line coverage (needs improvement)
- agents/linter.rs - 87.63% line coverage
- agents/metadata.rs - 80.54% line coverage
- agents/persona.rs - 86.17% line coverage
- agents/registry.rs - 77.58% line coverage (needs improvement)
- auth/credentials.rs - 97.47% line coverage
- auth/error.rs - 100% line coverage
- auth/providers.rs - 100% line coverage
- checkpoint/snapshot.rs - 86.07% line coverage
- config/mod.rs - 100% line coverage
- context/files.rs - 93.62% line coverage
- context/history.rs - 93.55% line coverage
- context/injection.rs - 97.35% line coverage
- context/manager.rs - 93.13% line coverage
- context/sources/local.rs - 89.36% line coverage
- context/sources/registry.rs - 95.24% line coverage
- context/templates.rs - 96.67% line coverage
- engines/detection.rs - 95.52% line coverage
- engines/engine_trait.rs - 100% line coverage
- engines/metrics.rs - 80.58% line coverage
- engines/providers/mock.rs - 95.77% line coverage
- error.rs - 90.48% line coverage
- extensions/discovery.rs - 96.88% line coverage
- extensions/manifest.rs - 97.17% line coverage
- extensions/signing.rs - 77.64% line coverage
- extensions/structure.rs - 68.86% line coverage
- extensions/versioning.rs - 74.74% line coverage
- hooks/profiler.rs - 91.83% line coverage
- learning/updates.rs - 72.73% line coverage
- mcp/config.rs - 86.62% line coverage
- mcp/error.rs - 100% line coverage
- mcp/messages.rs - 97.51% line coverage
- mcp/mod.rs - 98.92% line coverage
- mcp/tools.rs - 80.08% line coverage
- mcp/transport/http.rs - 78.43% line coverage
- mcp/transport/sse.rs - 75.81% line coverage
- mcp/transport/stdio.rs - 81.30% line coverage
- memory/adapter.rs - 100% line coverage
- memory/store.rs - 99.11% line coverage
- models/agent.rs - 99.45% line coverage
- models/plan.rs - 87.43% line coverage
- models/proto_convert.rs - 99.09% line coverage
- models/selector.rs - 68.64% line coverage
- models/task.rs - 95.95% line coverage
- models/workflow.rs - 96.92% line coverage
- monitoring/logs.rs - 98.44% line coverage
- monitoring/schema.rs - 94.05% line coverage
- planning/dag.rs - 89.91% line coverage
- planning/generator.rs - 98.22% line coverage
- planning/markdown.rs - 100% line coverage
- planning/parser.rs - 98.19% line coverage
- policy/conflict_resolution.rs - 74.48% line coverage
- policy/constitution.rs - 90.60% line coverage
- policy/rules.rs - 78.59% line coverage
- policy/types.rs - 100% line coverage
- prompts/processing.rs - 96.93% line coverage
- prompts/templates.rs - 99.20% line coverage
- sandbox/config.rs - 99.50% line coverage
- sandbox/docker.rs - 85.63% line coverage
- sandbox/sandbox.rs - 98.27% line coverage
- sandbox/seatbelt.rs - 79.07% line coverage
- storage/database.rs - 95.77% line coverage
- storage/repositories.rs - 93.42% line coverage
- workspace/mod.rs - 94.89% line coverage
- workspace/plan_discovery.rs - 96.48% line coverage
- workspace/requirement_id.rs - 100% line coverage
- workspace/structure.rs - 97.57% line coverage
Critical Uncovered Pathsβ
Error Handlingβ
-
hooks/error_hooks.rs - 0% coverage
- All error hook implementations are untested
- Critical for error recovery and logging
-
hooks/tool.rs - 0% coverage
- Tool hook implementations untested
- Critical for tool execution interception
-
hooks/model.rs - 0% coverage
- Model hook implementations untested
- Critical for model call interception
Configurationβ
-
hooks/config.rs - 14.14% coverage
- Hook configuration loading and parsing mostly untested
- Critical for hook system initialization
-
engines/config.rs - 4.92% coverage
- Engine configuration mostly untested
- Important for engine setup
Integration Pointsβ
-
mcp/integration.rs - 5.00% coverage
- MCP integration logic mostly untested
- Important for MCP server integration
-
mcp/client.rs - 35.99% coverage
- MCP client implementation partially tested
- Important for MCP communication
Uncovered Function Analysisβ
Top Uncovered Functions by Moduleβ
Hooks Module:
hooks/error_hooks.rs: 14 functions (100% uncovered)hooks/tool.rs: 12 functions (100% uncovered)hooks/model.rs: 10 functions (100% uncovered)hooks/config.rs: 12 functions (80% uncovered)hooks/loader.rs: 12 functions (33% uncovered)
MCP Module:
mcp/integration.rs: 33 functions (94% uncovered)mcp/client.rs: 20 functions (43% uncovered)mcp/auth.rs: 25 functions (57% uncovered)
Analytics Module:
analytics/storage.rs: 16 functions (100% uncovered)analytics/code_changes.rs: 4 functions (100% uncovered)
Extensions Module:
extensions/dependency_graph.rs: 20 functions (100% uncovered)extensions/analytics.rs: 13 functions (100% uncovered)extensions/publisher.rs: 12 functions (86% uncovered)
State Transitionsβ
Based on the codebase structure, the following state machines need comprehensive testing:
- Agent States - Covered in
agents/registry.rs(77.58% coverage) - Workflow States - Covered in
models/workflow.rs(96.92% coverage) - Task States - Covered in
models/task.rs(95.95% coverage) - Hook Execution States - Partially covered in
hooks/registry.rs(70.34% coverage)
Recommendationsβ
Phase 1: Critical Path Coverage (Target: 90%+)β
-
Hooks Module (Current: ~50% average)
- Priority: HIGH
- Focus: error_hooks.rs, tool.rs, model.rs, config.rs
- Estimated effort: High
-
Error Handlers (Current: 90.48% in error.rs)
- Priority: HIGH
- Focus: Module-specific error types
- Estimated effort: Medium
-
Agents Module (Current: ~75% average)
- Priority: HIGH
- Focus: validation.rs, telemetry.rs, model_selector.rs
- Estimated effort: Medium
-
Monitoring Module (Current: ~70% average)
- Priority: MEDIUM
- Focus: service.rs, telemetry.rs
- Estimated effort: Medium
Phase 2: Error Scenario Coverage (Target: 95%+)β
- Database error scenarios
- File system error scenarios
- Network error scenarios (MCP, HTTP)
- Concurrent access scenarios
Phase 3: Edge Cases & Boundaries (Target: 100%)β
- Empty inputs and null values
- Maximum size limits
- All state transitions
- All conditional branches
- All enum variants
Coverage Report Locationsβ
- HTML Report:
coverage-report/html/index.html - JSON Data:
coverage-report/coverage.json - This Analysis:
docs/testing/coverage-analysis-REQ-172.md
Next Stepsβ
- Review this analysis with the team
- Prioritize modules based on criticality and current coverage
- Create detailed testing backlog (Task 2)
- Begin implementing tests for highest priority modules