fix(daemon): verify IPC for discovery and process management - #221
Open
iuyo5678 wants to merge 1 commit into
Open
fix(daemon): verify IPC for discovery and process management#221iuyo5678 wants to merge 1 commit into
iuyo5678 wants to merge 1 commit into
Conversation
Share a bounded IPC status probe across discovery, readiness and doctor. Do not treat local PID visibility as daemon availability. Only a missing or refused endpoint permits startup; preserve access, timeout and response errors, and re-read discovery metadata once across replacement races. Require the kernel's IPC peer PID before signaling a process. Hold the daemon lock before stale metadata cleanup, preserve replacement records, and keep stopping without discovery a no-op. Reuse the same stop checks for CLI self-update. Cover unavailable local PIDs, inconsistent replies, permission failures, timeouts, stale locks, concurrent starts and restart. Include an optional Linux PID namespace regression. This addresses the reliability portion of #214; sandbox process persistence and runtime paths remain separate. Validation: workspace tests pass serially (632 tests); final targeted regressions pass (24 tests); cargo fmt and strict workspace Clippy pass. An unrelated parallel skill-install test failure also reproduces on main.
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.
Daemon discovery can reject a reachable daemon when its PID is not visible in the caller’s PID namespace. It can also treat IPC verification failures as a reason to start another instance.
This PR:
Addresses the daemon discovery and lifecycle reliability portion of #214. Sandbox process persistence and runtime directory/permission adaptation remain outside this PR.
Validation: