Skip to content

Test coverage audit: 72.5% total, targeting 80% #59

@JordanCoin

Description

@JordanCoin

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%)

Strategy

  1. cmd tests: Add httptest for serve, test buildContextEnvelope with temp dirs, test skill CLI
  2. mcp tests: Mock MCP request/response for each handler
  3. scanner tests: Cover remaining filegraph resolver edge cases
  4. Skip: render (visual output hard to test), daemon integration tests (flaky on CI)

What Changed Since Last Audit

Replaces #28.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions