story-kit: queue 123_story_test_coverage_llm_providers_anthropic_rs for QA

This commit is contained in:
Dave
2026-02-24 00:01:13 +00:00
parent 3bd1ed5c1d
commit b1b3e4416c

View File

@@ -0,0 +1,27 @@
---
name: "Add test coverage for llm/providers/anthropic.rs (0% -> 50%+)"
---
# Story 123: Add test coverage for llm/providers/anthropic.rs
Currently at 0% line coverage (204 lines). The Anthropic provider handles API communication for Claude models.
## What to test
- Request construction (headers, body format, model selection)
- Response parsing (streaming chunks, tool use responses, error responses)
- API key validation
- Rate limit / error handling
- Message format conversion (internal Message -> Anthropic API format)
## Notes
- Mock HTTP responses rather than calling the real Anthropic API
- Use `mockito` or similar for HTTP mocking, or test the pure functions directly
- Focus on serialization/deserialization and error paths
## Acceptance Criteria
- [ ] Line coverage for `llm/providers/anthropic.rs` reaches 50%+
- [ ] Tests pass with `cargo test`
- [ ] `cargo clippy` clean