---
id: TASK-35
title: Add log enablement + info/error coverage tests
status: Done
assignee:
  - codex
created_date: '2026-03-04 22:30'
updated_date: '2026-03-04 22:34'
labels: []
dependencies: []
references:
  - src/core/log.rs
  - /tmp/coverage.txt
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Coverage report shows uncovered lines in `src/core/log.rs` for `enabled()` branches and `info`/`error` calls. Add unit tests that exercise these paths without asserting on terminal output.
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 Add tests that set `KAZE_TESTING` and `KAZE_LOGS` to cover both enabled and disabled branches of `enabled()` (restore env afterward).
- [x] #2 Add tests that call `info()` and `error()` when logging is enabled to cover the main code paths (no output assertions required).
- [x] #3 Tests live in `src/core/log.rs` and pass under `just check`.
<!-- AC:END -->

## Implementation Plan

<!-- SECTION:PLAN:BEGIN -->
1) Add tests in src/core/log.rs that set/unset KAZE_TESTING and KAZE_LOGS to cover both branches of enabled() and restore env afterward (use existing lock helper).
2) Add a test that calls info() and error() when logging is enabled (no output assertions).
3) Run just check to confirm.
<!-- SECTION:PLAN:END -->

## Implementation Notes

<!-- SECTION:NOTES:BEGIN -->
Added test to call info/error with logging enabled (env set) and reused existing enabled() env-branch test. Ran `just check -- -D warnings` (passes).
<!-- SECTION:NOTES:END -->

## Final Summary

<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Added a log test that calls info/error with logging enabled to cover output paths (env flags set). Tests: `just check -- -D warnings`.
<!-- SECTION:FINAL_SUMMARY:END -->
