From 290a815628d8cad091a579f0298b987a842ce97a Mon Sep 17 00:00:00 2001 From: Dave Date: Mon, 23 Feb 2026 23:43:27 +0000 Subject: [PATCH] story-kit: create 124_story_test_coverage_llm_providers_claude_code_rs --- ...t_coverage_llm_providers_claude_code_rs.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .story_kit/work/1_upcoming/124_story_test_coverage_llm_providers_claude_code_rs.md diff --git a/.story_kit/work/1_upcoming/124_story_test_coverage_llm_providers_claude_code_rs.md b/.story_kit/work/1_upcoming/124_story_test_coverage_llm_providers_claude_code_rs.md new file mode 100644 index 0000000..b2a6438 --- /dev/null +++ b/.story_kit/work/1_upcoming/124_story_test_coverage_llm_providers_claude_code_rs.md @@ -0,0 +1,28 @@ +--- +name: "Add test coverage for llm/providers/claude_code.rs (54% -> 75%+)" +--- + +# Story 124: Add test coverage for llm/providers/claude_code.rs + +Currently at 54% line coverage (496 lines, 259 missed). The Claude Code provider spawns `claude` CLI processes and manages their I/O. + +## What to test + +- Command argument construction (model, max-turns, budget, system prompt, append flags) +- Output parsing (streaming JSON events from claude CLI) +- Session ID extraction +- Process lifecycle management +- Error handling (process crash, invalid output, timeout) +- Permission request/response flow + +## Notes + +- Mock the process spawning rather than running real `claude` commands +- Test the output parsing logic with sample JSON event streams +- The argument construction logic is especially testable as pure functions + +## Acceptance Criteria + +- [ ] Line coverage for `llm/providers/claude_code.rs` reaches 75%+ +- [ ] Tests pass with `cargo test` +- [ ] `cargo clippy` clean