Skip to content

chore: elevate branch coverage with non-extractor test gaps#174

Open
jafreck wants to merge 4 commits intomainfrom
chore/elevate-coverage
Open

chore: elevate branch coverage with non-extractor test gaps#174
jafreck wants to merge 4 commits intomainfrom
chore/elevate-coverage

Conversation

@jafreck
Copy link
Owner

@jafreck jafreck commented Mar 11, 2026

Summary

Raises CI coverage thresholds to 85% and closes the largest non-extractor test gaps. Supersedes #172 (the extractor inline tests from that PR are obsolete after #173's per-language fixture refactor).

Changes

Config

  • vitest.config.ts: include: ["src/**/*.ts"] so uncovered files are counted. All 4 thresholds raised to 85%.
  • codecov.yml: Project and patch targets raised to 85% (2% threshold).

New tests

File Tests added What it covers
tests/lore-server/tools/graph-analysis.test.ts 15 All 4 analysis modes (cycles, components, clusters, summary)
tests/runtime.test.ts 10 LoreRuntime construction, start/shutdown, idempotency, signal handlers
tests/lore-server/tool-registry.test.ts +8 buildToolModules, loggedHandler success/error, propertyToZod edge cases
tests/lore-server/server.test.ts +2 createLoreMcpServerAsync factory

Expanded tests

File Tests added What it covers
tests/cli.test.ts +18 analyze subcommand (all modes, validation), history-depth, language filter
tests/indexer/embedder.test.ts +3 LazyEmbeddingProvider failed-init dispose, dims throw
tests/indexer/graph-analysis.test.ts +5 Branch option filtering, empty methods array
tests/indexer/complexity.test.ts +1 Parameter fallback walk
tests/indexer/config-parser.test.ts +4 Array values, unquoted values, nested objects, booleans
tests/lore-server/db.test.ts +22 listCommitCadence/Sizes/ChurnByFile/AuthorStats/MessagePrefixes/Schedule/BranchActivity with filter variations

Relationship to other PRs

jafreck added 4 commits March 10, 2026 21:38
…istry tests

Cherry-picked from coverage/raise-to-85 (76d5833), minus the obsolete
coverage.test.ts inline tests.

- codecov.yml: raise project/patch targets to 85%
- vitest.config.ts: add include pattern, raise thresholds
- graph-analysis.test.ts: 15 tests for cycles/components/clusters/summary
- runtime.test.ts: 10 tests for LoreRuntime lifecycle
- tool-registry.test.ts: buildToolModules, loggedHandler, propertyToZod
- server.test.ts: createLoreMcpServerAsync factory
…ch filtering, embedder edge cases

- CLI: analyze subcommand (all modes), history-depth validation, language filter
- graph-analysis: branch option filtering, empty methods array
- embedder: LazyEmbeddingProvider failed-init dispose, dims throw

Branch coverage: 74.08% → 75.24%
- complexity: parameter fallback walk when parameters field absent
- config-parser: array values in JSON, unquoted values, nested objects

Branch coverage: 75.34% → 75.47%
Tests for: listCommitCadence, listCommitSizes, listCommitChurnByFile,
listCommitAuthorStats, listCommitMessagePrefixes, listCommitSchedule,
listCommitBranchActivity with filter variations.

Branch coverage: 75.47% → 76.05%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant