---
id: TASK-10
title: Raise test coverage to >90%
status: Done
assignee: []
created_date: '2026-02-26 12:52'
updated_date: '2026-02-26 13:10'
labels: []
dependencies: []
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Increase unit test coverage so the project meets the goal of >90% overall coverage from `just coverage`, focusing on currently under-tested modules.
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 `just coverage` reports >90% total line coverage.
- [x] #2 Coverage improvements are delivered through unit/integration tests without changing CLI/config behavior.
- [x] #3 Any new or updated tests are stable and pass with `just test`.
<!-- AC:END -->

## Implementation Plan

<!-- SECTION:PLAN:BEGIN -->
Coverage initiative breakdown:
- TASK-10.1 (codex): Add hermetic unit tests for command dispatch and handlers in `src/core/cmd.rs`.
- TASK-10.2: Improve coverage in config resolution (`src/core/config.rs`).
- TASK-10.3: Cover remaining branches in config loading and CLI parsing.
- TASK-10.4: Expand tests for `src/main.rs` entrypoint.
Sequence: 10.1 first to unblock overall coverage gains; remaining subtasks can proceed independently after.
<!-- SECTION:PLAN:END -->

## Implementation Notes

<!-- SECTION:NOTES:BEGIN -->
Coverage after subtasks: total line coverage 94.40% per `just coverage`. All subtasks (TASK-10.1 through TASK-10.4) completed.
<!-- SECTION:NOTES:END -->

## Final Summary

<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Raised overall coverage above 90% by adding unit and integration tests across command dispatch, configuration resolution, config loading, CLI parsing, and binary entrypoint behavior. Coverage now 94.40% line coverage overall per `just coverage`.

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