Add runtime store writability preflight - #72
Merged
Conversation
Custom daemon lifecycle callers need an explicit way to detect an inaccessible runtime directory before they spawn a detached child and wait for readiness. Define the narrow application-neutral contract before adding the public API so its advisory nature and error-preservation boundary stay clear. Generated with Codex Co-authored-by: Codex <codex@openai.com>
Custom daemon lifecycle callers can otherwise start a detached child when its runtime directory is readable but not writable, then wait until readiness times out without seeing the filesystem failure. Give RuntimeStore an advisory check that uses the same private-directory rules and preserves the underlying error so callers can fail before spawn. The temporary probe stays outside runtime-record and lock namespaces and removes itself after the check. Generated with Codex Co-authored-by: Codex <codex@openai.com>
roborev: Combined Review (
|
mariusvniekerk
approved these changes
Aug 19, 2026
The pull request should contain the reusable runtime-store API and its tests, not agent planning artifacts that are unrelated to the public package surface. Generated with Codex Co-authored-by: Codex <codex@openai.com>
roborev: Combined Review (
|
wesm
added a commit
to kenn-io/kata
that referenced
this pull request
Aug 19, 2026
Kata currently carries its own runtime-directory write probe for daemon auto-start. This delegates that preflight to `daemon.RuntimeStore.CheckWritable`, added by kenn-io/kit#72, so Kata follows kit's symlink, ownership, and private-directory validation while keeping its existing operator-facing errors. This updates kit to the tagged `v0.21.3` release containing the new API. --------- Co-authored-by: Codex <codex@openai.com>
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.
Custom daemon lifecycle callers can start a detached child when its runtime directory is readable but not writable. The child can exit before publishing its runtime record, leaving the caller to report only a readiness timeout.
This adds
RuntimeStore.CheckWritable, which applies the store's existing private-directory rules and uses a temporary probe outside runtime-record and lock namespaces. Filesystem errors remain available througherrors.Is, allowing each application to provide its own recovery guidance.The check is deliberately advisory: it proves the calling process's current access but does not guarantee future access or identical child-process permissions.
StartDetachedandManager.Ensureremain unchanged.Refs: dn3x