Skip to content

fix: implement KildError trait for DaemonClientError (#332)#346

Merged
Wirasm merged 2 commits into
mainfrom
kild/332-daemon-client-error
Feb 11, 2026
Merged

fix: implement KildError trait for DaemonClientError (#332)#346
Wirasm merged 2 commits into
mainfrom
kild/332-daemon-client-error

Conversation

@Wirasm

@Wirasm Wirasm commented Feb 11, 2026

Copy link
Copy Markdown
Owner

Summary

DaemonClientError was the only error type in kild-core that didn't implement the KildError trait, breaking the documented error handling contract from CLAUDE.md.

Root Cause

The trait impl was simply never added when DaemonClientError was introduced in the initial daemon crate commit (6f1cfa7). All 14 other domain error types have KildError implementations.

Changes

File Change
crates/kild-core/src/daemon/client.rs Added KildError impl with DAEMON_* error codes
crates/kild-core/src/daemon/client.rs Added tests for error_code() and is_user_error() on all 5 variants

Testing

  • cargo fmt --check — clean
  • cargo clippy --all -- -D warnings — 0 warnings
  • cargo test --all — all 1,396 tests pass
  • Error codes use DAEMON_* prefix matching DaemonAutoStartError convention
  • Only NotRunning is marked as user error (user can fix by starting daemon)

Validation

cargo fmt --check && cargo clippy --all -- -D warnings && cargo test --all

Issue

Fixes #332

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
@Wirasm

Wirasm commented Feb 11, 2026

Copy link
Copy Markdown
Owner Author

Automated Code Review

Summary

Clean implementation that follows established patterns exactly. No issues found.

Findings

Strengths

  • Mirrors the exact KildError pattern from DaemonAutoStartError in daemon/errors.rs
  • Error codes follow DAEMON_* prefix convention consistently
  • Only NotRunning classified as user error — correct, since only that variant is user-actionable
  • Tests cover all 5 variants for both trait methods

Security

  • No security concerns — purely additive trait implementation with no new I/O or data handling

Checklist

  • Fix addresses root cause (missing trait impl)
  • Code follows codebase patterns
  • Tests cover the change
  • No obvious bugs introduced

@Wirasm Wirasm merged commit f3f1b8e into main Feb 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: DaemonClientError doesn't implement KildError trait

1 participant