refactor: decouple kild CLI from kild-daemon server embedding#351
Merged
Conversation
Owner
Author
PR Review SummaryCritical Issues (1 found)
Important Issues (1 found)
Suggestions (3 found)
Documentation Updates
Strengths
Verdict: NEEDS FIXESRecommended Actions
|
Make kild-daemon a standalone binary instead of embedding it as a library dependency in the CLI. The CLI now spawns kild-daemon as a subprocess for both foreground and background modes, and auto-start discovers the binary as a sibling executable. This removes tokio and kild-daemon dependencies from the CLI crate, resulting in a smaller binary and cleaner dependency separation. Closes #324
Clarify that kild-daemon is now a standalone binary spawned as a subprocess by the CLI, rather than being embedded as a library dependency. Auto-start discovers the binary as a sibling executable.
…startup - Extract binary discovery logic into `daemon::find_sibling_binary()` in kild-core, eliminating duplication across autostart.rs, daemon.rs (CLI), and handler.rs (shim) - Add child process crash detection to CLI background daemon start loop (matching autostart.rs behavior) - Add debug logging to CLI daemon socket readiness loop - Add structured error logging to kild-daemon main.rs for config load, runtime init, and server failures
bdf60a5 to
6e7664f
Compare
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
kild-daemona standalone binary instead of embedding the server as a library dependency in the CLI cratekild-daemonas a subprocess for both foreground (--foreground) and background modeskild-corediscovers the daemon binary as a sibling executable (same pattern askild-tmux-shim)tokioandkild-daemondependencies from the CLI crateTest plan
cargo fmt --checkpassescargo clippy --all -- -D warningspasses (zero warnings)cargo test --allpasses (all tests green)cargo build --allsucceeds (bothkildandkild-daemonbinaries produced)kild daemon startstarts daemon in backgroundkild daemon start --foregroundspawnskild-daemonwith inherited stdiokild daemon stop/kild daemon statuswork unchangedkild-daemonbinary spawnCloses #324