Repository navigation
fix(daemon): detect effective systemd service overrides - #128705
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
August 24, 2026 11:56
Contributor
Author
|
Land-ready proof for exact head
Proof gap: no live Linux user-systemd run was available on the macOS development host, and the configured Crabbox path could not be started because the |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 25, 2026
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.
Related: #50186
What Problem This Solves
Fixes an issue where Linux operators running
openclaw statusoropenclaw doctorcould receive stale systemd hygiene results when drop-ins or dependency links changedKillMode,RestartSec,After, orWants. The audit read only the base user unit, so effective unsafe overrides could be missed and effective repairs could still be warned about.Why This Change Was Made
Use systemd's loaded manager state as the authority for the four scalar/dependency properties via one bounded
systemctl showrequest through the existing account-aware user-manager transport. Successful manager output replaces the file snapshot wholesale; manager failure retains the existing best-effort base-unit fallback. Status passes its existing deadline; Doctor uses the finite audit default. ExecStart inspection, repair policy, and Team-specific policy remain out of scope. AI-assisted; implementation and tests were reviewed and understood.User Impact
Linux operators now see audit warnings that match the service configuration systemd is actually running, including drop-in overrides. Status/Doctor remain fail-soft when systemd cannot be queried and retain existing behavior on macOS and Windows.
Evidence
node scripts/run-vitest.mjs src/daemon/service-audit.test.ts -t 'respects systemd manager authority'failed all four rows because production never queried manager-effective state; it passes after the repair.node scripts/run-vitest.mjs src/daemon/service-audit.test.ts src/cli/daemon-cli/status.gather.test.ts— 98 passed.node scripts/check-changed.mjs -- src/daemon/service-audit.ts src/daemon/service-audit.test.ts src/cli/daemon-cli/status.gather.ts src/cli/daemon-cli/status.gather.test.ts— passed all selected core/coreTests checks.git diff --check— passed.After/Wantsare manager dependency arrays,RestartUSecis the effective duration property rendered bysystemctl show, andKillModeis a manager string property.crabboxCLI is not installed. The change is covered at the manager execution boundary and will receive exact-head Linux CI/Testbox proof before landing.