-
Notifications
You must be signed in to change notification settings - Fork 42
Test coverage audit: 72.5% total, targeting 80% #59
Copy link
Copy link
Open
Description
Current State (2026-03-27)
Total: 72.5% across 10 packages, 165 uncovered functions.
| Package | Coverage | 0% Functions | Priority |
|---|---|---|---|
| limits | 100.0% | 1 | Done |
| config | 87.9% | 7 | Low |
| skills | 84.9% | 1 | Low |
| watch | 83.9% | 11 | Medium |
| scanner | 81.5% | 23 | Medium |
| handoff | 80.2% | 15 | Low |
| render | 78.5% | 18 | Low (visual output) |
| mcp | 62.9% | 10 | High |
| cmd | 62.5% | 22 | High |
| main | 60.2% | 3 | Medium |
Biggest Gaps
cmd (62.5% → target 75%)
context.go: RunContext, buildContextEnvelope, buildProjectContext, countSourceFiles — all 0%drift.go: checkSubsystemDrift, lastModifiedCommitsAgo, resolveCodePaths — all 0% (git-dependent)hooks.go: 22 uncovered functions (many are integration-level: session-start, session-stop, multi-repo)serve.go: RunServe — 0% (HTTP server, needs httptest)skill.go: runSkillList, runSkillShow, runSkillInit — 0%
mcp (62.9% → target 75%)
- 10 handler functions at 0% (all MCP tool handlers)
- These need test scaffolding with mock MCP requests
scanner (81.5% → target 85%)
- filegraph.go: 9 uncovered functions (resolver logic)
- deps.go: 6 uncovered functions (parseCsproj, parsePackagesConfig already tested in Fix C# --deps: add .csproj/packages.config parsing, fix namespace resolution, add directory-based import matching #47)
Strategy
- cmd tests: Add httptest for serve, test buildContextEnvelope with temp dirs, test skill CLI
- mcp tests: Mock MCP request/response for each handler
- scanner tests: Cover remaining filegraph resolver edge cases
- Skip: render (visual output hard to test), daemon integration tests (flaky on CI)
What Changed Since Last Audit
- skills/ package added: 84.9% (new, well-tested)
- watch working set: well-tested
- intent classification: 100%
- C# dependency resolution: covered by Fix C# --deps: add .csproj/packages.config parsing, fix namespace resolution, add directory-based import matching #47 tests
- Context envelope: detectLanguagesFromFiles 100%, but envelope builder 0%
Replaces #28.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels