Repository navigation
Doctor: expose systemd linger findings - #97514
giodl73-repo merged 7 commits into
Conversation
|
@clawsweeper review New default-disabled systemd-linger structured lint slice. Validation passed: focused Doctor contribution Vitest 51 tests, changed-file oxlint, tsgo:core, local child check:changed, SDK surface, diff check. No config/plugin/SDK/data-model or repair-path contract change. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: stale review; fresh review needed. Summary Next step Review history (10 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review Current head Changes:
Validation:
Known proof gap is explicit in the PR body: no real non-WSL loaded Gateway systemd-user-service host was available here, so loaded-service disabled/enabled linger paths remain source-harness covered. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
2fe7e3a to
a39e27b
Compare
|
Maintainer update after refresh:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Merged as maintainer after final verification. What changed in final prep:
Validation:
The normal wrapper merge path uses GitHub rebase merge and GitHub rejected that method ( |
Expose an opt-in Doctor lint finding for Linux Gateway hosts where a loaded user-level systemd gateway unit has systemd lingering disabled.\n\nValidation:\n- Targeted Doctor health contribution tests passed locally.\n- Exact-head hosted checks passed on 65ec5a0, including QA Smoke CI, Real behavior proof, security/CodeQL, check-shrinkwrap, and selected CI shards.\n- Crabbox Azure proof exercised a loaded user systemd gateway unit with Linger=no and observed the expected lint warning.\n\nCo-authored-by: giodl73-repo <[email protected]>
Summary
core/doctor/systemd-linger--all/--onlystays quiet on hosts without an OpenClaw systemd user serviceValidation
node scripts/run-vitest.mjs run src/flows/doctor-health-contributions.test.ts --reporter=verbose(72 tests) on rebased heada39e27b668ee57f4ec3279bb9c6c739af7a3b3a9git diff --check./node_modules/.bin/oxfmt --check src/flows/doctor-health-contributions.ts src/flows/doctor-health-contributions.test.ts./node_modules/.bin/oxlint src/flows/doctor-health-contributions.ts src/flows/doctor-health-contributions.test.tsCI=1 PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false node scripts/run-oxlint.mjs src/flows/doctor-health-contributions.ts src/flows/doctor-health-contributions.test.tsnode scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core.tsbuildinfonode --max-old-space-size=8192 scripts/plugin-sdk-surface-report.mjs --checknode scripts/sync-plugin-sdk-exports.mjs --checkReal behavior proof
Behavior or issue addressed:
Selected
doctor --lint --only core/doctor/systemd-lingershould not warn merely because local Linux linger is disabled. It should only report disabled linger when OpenClaw is actually running through a loaded Gateway systemd user service, matching the legacy Doctor path.Real environment tested:
Crabbox brokered Linux VM, provider
azure, leasecbx_6322dfa0e580, slugviolet-shrimp, runrun_2dd29a8828cc, targetlinux, machine typeStandard_D32ads_v6. The host had real systemd PID 1, an active user systemd manager,openclaw-gateway.serviceenabled as a user unit, andloginctl show-user crabbox -p LingerreturnedLinger=no.Exact steps or command run after this patch:
pnpm build.~/.config/systemd/user/openclaw-gateway.servicewithExecStart=/bin/sleep infinity.systemctl --user daemon-reloadsystemctl --user enable openclaw-gateway.servicesystemctl --user is-enabled openclaw-gateway.serviceloginctl show-user crabbox -p LingerOPENCLAW_SYSTEMD_UNIT=openclaw-gateway OPENCLAW_STATE_DIR=$(mktemp -d) OPENCLAW_CONFIG_PATH=$(mktemp -d)/config.json ./openclaw.mjs doctor --lint --json --only core/doctor/systemd-lingersystemctl --user daemon-reload.Evidence after fix:
Quiet-path proof:
Earlier WSL source CLI proof with
Linger=noand no loaded Gateway systemd user service exited 0 and emitted no findings:Observed result after fix:
The selected structured lint check stays quiet when the Gateway service is not loaded, and emits the warning only when a real Linux user systemd service for
openclaw-gatewayis loaded while linger remains disabled. Focused tests on the rebased head cover both the positive selected-lint warning path and the selected quiet path wherereadSystemdUserLingerStatusis not called unless the Gateway service is loaded.What was not tested:
After rebasing to head
a39e27b668ee57f4ec3279bb9c6c739af7a3b3a9, an exact-head Crabbox rerun was attempted, but the local wrapper timed out and subsequentcrabbox list/historybroker calls returned HTTP 500 (error code: 1101). The rebased head passed the focused Doctor contribution test file locally in WSL, and the systemd-linger implementation remains the same loaded-service gate proven by the Crabbox run above.Contract
No config schema, plugin manifest, SDK, persisted data model, or repair-path contract change. This adds only an opt-in structured Doctor lint finding for existing systemd-linger health behavior.