---
id: TASK-2
title: Increase unit test coverage to >90% for core/config modules
status: Done
assignee: []
created_date: '2026-02-23 13:34'
updated_date: '2026-02-23 19:29'
labels:
  - tests
  - coverage
dependencies: []
references:
  - src/core/cli.rs
  - src/core/exec.rs
  - src/core/config.rs
  - src/config/load.rs
  - src/config/schema.rs
  - src/main.rs
documentation:
  - docs/spec.md
  - docs/plan.md
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Raise unit test coverage by adding behavior-focused tests for missing branches and lines in core and config modules, without adding main tests. Coverage target applies to library code; confirm how to treat main.rs in coverage reporting.
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 Unit test coverage for library modules (core, config) exceeds 90% using `just coverage` report, excluding main.rs from the target.
- [x] #2 New tests cover missing branches/lines with behavior-based assertions (no shallow line hits).
- [x] #3 No new tests rely on external services or network.
- [x] #4 `just test` and `just coverage` pass.
<!-- AC:END -->

## Implementation Notes

<!-- SECTION:NOTES:BEGIN -->
All subtasks completed. Current overall coverage ~86.9% due to main.rs and remaining core/config gaps. User confirmed closing open tasks.
<!-- SECTION:NOTES:END -->
