fix: implement KildError trait for DaemonClientError (#332)#346
Merged
Conversation
DaemonClientError was the only error type in kild-core missing the KildError trait implementation, breaking the documented error handling contract. Changes: - Add KildError impl with DAEMON_* error codes matching existing convention - NotRunning is the only user error (user can fix by starting daemon) - Add tests covering all 5 variants for error_code() and is_user_error() Fixes #332
Owner
Author
Automated Code ReviewSummaryClean implementation that follows established patterns exactly. No issues found. FindingsStrengths
Security
Checklist
|
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
DaemonClientErrorwas the only error type in kild-core that didn't implement theKildErrortrait, breaking the documented error handling contract from CLAUDE.md.Root Cause
The trait impl was simply never added when
DaemonClientErrorwas introduced in the initial daemon crate commit (6f1cfa7). All 14 other domain error types haveKildErrorimplementations.Changes
crates/kild-core/src/daemon/client.rsKildErrorimpl withDAEMON_*error codescrates/kild-core/src/daemon/client.rserror_code()andis_user_error()on all 5 variantsTesting
cargo fmt --check— cleancargo clippy --all -- -D warnings— 0 warningscargo test --all— all 1,396 tests passDAEMON_*prefix matchingDaemonAutoStartErrorconventionNotRunningis marked as user error (user can fix by starting daemon)Validation
Issue
Fixes #332