Repository navigation
Pre-create sovereign-conversation.service's ReadWritePaths targets - #24
Merged
kasunben merged 1 commit intoAug 23, 2026
Merged
Conversation
Unlike StateDirectory=/CacheDirectory=/etc., ReadWritePaths= does not auto-create a missing target -- the path must already exist before systemd can even construct the unit's private mount namespace under DynamicUser=yes + ProtectSystem=strict, or the service fails outright (226/NAMESPACE) before sovereign_capabilities.py's/ sovereign_homeassistant.py's own path.parent.mkdir() calls ever get a chance to run. Found live on real hardware: after a freshly-committed base-OS update (the first time this service has ever started under its real DynamicUser sandbox rather than manually as root), both /data/sovereign/capabilities and /data/sovereign/secrets/home-assistant were missing and the service crash-looped until created by hand. This was a previously-disclosed, never-verified risk (searxng-signed-release-qualification-assessment.md's own Conversation Service smoke-test limitations). Fixed with an ExecStartPre=+ line (root-privileged, ahead of DynamicUser's own sandbox setup) creating both directories with the same root:sovereign-pihole-secrets/0770 pattern start-pihole already uses for its own DynamicUser-writable directory. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
kasunben
marked this pull request as ready for review
August 23, 2026 08:04
kasunben
added a commit
that referenced
this pull request
Aug 23, 2026
…fication Closes PR #17's last open test-plan item ("Real signed-release qualification: artifact/import systemd paths, real hardened sandbox"). A real, signed 0.1.0-preview.25 release -- built by CI, signed offline by the maintainer -- was staged, tried, and committed on both the base-OS and appliance layers of the real qualification device, with llama-server, SearXNG, and the Conversation Service all confirmed running under their real production systemd units and hardened DynamicUser sandboxes. Records the full method, the three real defects found and fixed along the way (Findings 5-7, all already merged in #22/#23/#24), and two incidental findings (systemd Requires= pulls backward not forward; a stale journal file silently stopped logging after the base-OS commit, self-resolved, not a code defect). Updates ROADMAP.md's Milestone 4 to Complete and removes now-stale "not yet achievable" language throughout that section. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.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.
Summary
ReadWritePaths=(unlikeStateDirectory=/CacheDirectory=/etc.) does not auto-create a missing target — the path must already exist before systemd can construct the unit's private mount namespace underDynamicUser=yes+ProtectSystem=strict, or the service fails outright (226/NAMESPACE) before the Python code's own lazypath.parent.mkdir()calls ever runsovereign-conversation.servicehas ever started under its realDynamicUsersandbox rather than manually as root — both/data/sovereign/capabilitiesand/data/sovereign/secrets/home-assistantwere missing, and the service crash-looped until created by handsearxng-signed-release-qualification-assessment.md's own Conversation Service smoke-test Limitations)ExecStartPre=+line (root-privileged, ahead ofDynamicUser's own sandbox setup) creating both directories with the sameroot:sovereign-pihole-secrets/0770patternstart-piholealready uses for its ownDynamicUser-writable directoryTest plan
test_readwritepaths_targets_are_provisioned_before_start— confirmed it fails without the fix, passes with itpython3 -m unittest discover -s tests -v— 635/635 passsovereign.local: created both directories by hand with this exact ownership/mode, restarted the service, confirmedactive (running)and a realGET /api/v1/conversation/healthresponse🤖 Generated with Claude Code