Skip to content

Add runtime store writability preflight - #72

Merged
wesm merged 3 commits into
mainfrom
runtime-store-check-writable
Aug 19, 2026
Merged

Add runtime store writability preflight#72
wesm merged 3 commits into
mainfrom
runtime-store-check-writable

Conversation

@wesm

@wesm wesm commented Aug 19, 2026

Copy link
Copy Markdown
Member

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 through errors.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. StartDetached and Manager.Ensure remain unchanged.

Refs: dn3x

wesm and others added 2 commits August 19, 2026 09:33
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-ci

roborev-ci Bot commented Aug 19, 2026

Copy link
Copy Markdown

roborev: Combined Review (ee8434d)

Code review passed: no Medium, High, or Critical findings.


Reviewers: 2 done | Synthesis: codex, 5s | Total: 2m42s

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-ci

roborev-ci Bot commented Aug 19, 2026

Copy link
Copy Markdown

roborev: Combined Review (0546751)

Code looks clean with no findings at medium severity or above.


Reviewers: 2 done | Synthesis: codex, 6s | Total: 2m1s

@wesm
wesm merged commit eda6f08 into main Aug 19, 2026
11 checks passed
@wesm
wesm deleted the runtime-store-check-writable branch August 19, 2026 19:07
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants