refactor: migrate library crates from anyhow to thiserror#277
Merged
Conversation
Replace anyhow with typed error enums in all library crates: - zeph-llm: LlmError (11 variants) - zeph-memory: MemoryError (7 variants, Box<QdrantError> for size) - zeph-skills: SkillError (9 variants) - zeph-index: IndexError (8 variants) - zeph-channels: ChannelError (2 variants) - zeph-mcp: McpError extended (4 new variants) - zeph-tui: TuiError (3 variants) LlmProvider trait returns Result<T, LlmError> instead of anyhow::Result. zeph-core remains on anyhow, typed errors auto-convert via ?. 1347 tests pass, clippy clean. Closes #270
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (53.72%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage. @@ Coverage Diff @@
## main #277 +/- ##
==========================================
- Coverage 81.13% 81.03% -0.11%
==========================================
Files 87 87
Lines 24556 24588 +32
==========================================
Hits 19924 19924
- Misses 4632 4664 +32
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
anyhowwith typedthiserrorerror enums in all 7 library cratesLlmError(11 variants),MemoryError(7),SkillError(9),IndexError(8),ChannelError(2),McpError(+4),TuiError(3)LlmProvidertrait now returnsResult<T, LlmError>instead ofanyhow::ResultBox<QdrantError>used where clippy flags large error sizezeph-corestays on anyhow — typed errors auto-convert via?error.rsfilesTest plan
cargo nextest run --workspace --lib --bins— 1347 passedcargo clippy --workspace -- -D warnings— zero warningsanyhowin library crate sourcesPhase 2 of #268. Closes #270.