|
| 1 | +--- |
| 2 | +title: Code Coverage to 75% |
| 3 | +status: completed |
| 4 | +created: 2026-03-28 |
| 5 | +updated: 2026-03-28 |
| 6 | +current_chapter: 1 |
| 7 | +loop: true |
| 8 | +loop_target: 75.0 |
| 9 | +loop_metric: instruction_coverage_percent |
| 10 | +loop_max_iterations: 3 |
| 11 | +--- |
| 12 | + |
| 13 | +# Plan: Code Coverage to 75% |
| 14 | + |
| 15 | +Raise JaCoCo instruction coverage from **67.9%** to **≥75%** using a closed-loop approach. |
| 16 | + |
| 17 | +**Baseline (2026-03-28):** 15,122 / 22,277 instructions covered (67.9%), 386 tests passing. |
| 18 | +**Need:** ~1,580 more instructions covered (16,708 / 22,277). |
| 19 | + |
| 20 | +## Priority targets (testable classes, by uncovered instructions) |
| 21 | + |
| 22 | +| Class | Coverage | Uncovered | Plan | |
| 23 | +|-------|----------|-----------|------| |
| 24 | +| ReladomoService | 56.5% | 346 | Expand: store/query edge cases | |
| 25 | +| IngestionWorker | 74.1% | 323 | Expand: error paths, HNSW build | |
| 26 | +| TextExtractor | 76.2% | 294 | Expand: RTF, more ODF/EPUB edges | |
| 27 | +| SearchService | 76.4% | 222 | Expand: HNSW path, edge cases | |
| 28 | +| CoChangeService | 59.2% | 216 | Expand: DB-backed buildIndex | |
| 29 | +| GitBlameService | 57.3% | 195 | Expand: DB-backed blame, edges | |
| 30 | +| ReladomoConfigParser | 20.1% | 195 | New: parse config XML tests | |
| 31 | +| SessionIngestionService | 83.0% | 177 | Expand: search, edge cases | |
| 32 | + |
| 33 | +## Chapter 1: Service Coverage Push (target: ≥75%) |
| 34 | +**Status:** completed |
| 35 | +**Depends on:** none |
| 36 | + |
| 37 | +Parallel agents targeting the 8 classes above. Each agent writes tests to cover the uncovered branches. |
| 38 | + |
| 39 | +- [ ] ReladomoService: test storeReladomoObject edge cases, update/delete paths — target 56% → 75% |
| 40 | +- [ ] CoChangeService + GitBlameService: DB-backed tests for buildCoChangeIndex with real git, blame edge cases — target 59%/57% → 75% |
| 41 | +- [ ] SearchService: test HNSW search path, extractEmbedding variants, empty results — target 76% → 85% |
| 42 | +- [ ] ReladomoConfigParser: test XML config parsing for connection managers, object configs — target 20% → 60% |
| 43 | +- [ ] IngestionWorker + TextExtractor + SessionIngestionService: expand edge case coverage — target 74%/76%/83% → 85% |
| 44 | +- [ ] Write all tests, run `mvn verify`, measure coverage |
| 45 | +- [ ] If ≥75%, mark plan completed |
| 46 | + |
| 47 | +## Closed-Loop Protocol |
| 48 | + |
| 49 | +1. Run `mvn verify -B`, parse `jacoco.csv` → instruction coverage % |
| 50 | +2. If ≥75%: **STOP**, mark plan completed |
| 51 | +3. If <75%: identify remaining gaps, write targeted tests, re-measure (max 2 extra iterations) |
| 52 | + |
| 53 | +## Exclusions (CLI/UI — 0% coverage, low ROI) |
| 54 | +IndexCommand, StatsPanel, InteractiveCli, CommandDispatcher, CatCommand, ApiClient, |
| 55 | +JavaDuckerClient (and nested Cmd classes), ResultsFormatter, ProgressBar, SearchCommand, StatusCommand |
| 56 | + |
| 57 | +--- |
0 commit comments