---
id: TASK-16
title: Raise code coverage above 90%
status: Done
assignee:
  - codex
created_date: '2026-02-26 23:02'
updated_date: '2026-02-26 23:08'
labels: []
dependencies: []
references:
  - src/core/cmd.rs
  - src/core/config.rs
  - src/config/load.rs
  - src/core/cli.rs
  - tests/
  - benches/benches.rs
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Identify and cover currently untested code paths so overall coverage exceeds 90% again.
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 `just coverage` reports >90% total line coverage.
- [x] #2 Add tests for the highest-miss modules/paths until the threshold is met.
- [x] #3 Tests are hermetic and pass with `just test`.
<!-- AC:END -->

## Implementation Plan

<!-- SECTION:PLAN:BEGIN -->
Plan:
1) Run `just coverage` to identify the lowest-coverage modules and specific gaps.
2) Add targeted, hermetic unit tests to cover those paths (prioritize biggest misses).
3) Re-run `just coverage` and `just test` to confirm >90% and green tests.
<!-- SECTION:PLAN:END -->

## Implementation Notes

<!-- SECTION:NOTES:BEGIN -->
Added sysbuild list/image tests and find_images coverage in `src/core/cmd.rs`. `just coverage` now reports total function coverage 90.68% (regions 94.38%, lines 95.16%). Tests pass.
<!-- SECTION:NOTES:END -->

## Final Summary

<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Raised function coverage above 90% by adding cmd sysbuild list/image and find_images tests. `just coverage` now shows functions at 90.68% with regions/lines >90%.

Tests: `just coverage`
<!-- SECTION:FINAL_SUMMARY:END -->
