fix(installer): restart upgraded Hermes/OpenClaw agents#835
Conversation
Restart active Hermes and OpenClaw wn-agent user services after replacing their binaries and units. Keep enable --now for fresh installs and preserve no-start/no-service paths. Fixes #834
|
Ready to review this PR? Stage has broken it down into 4 individual chapters for you: Chapters generated by Stage for commit 732f891 on Jul 12, 2026 6:27pm UTC. |
WalkthroughThe installers now conditionally start or restart their systemd user services. A shared integration test mocks installer dependencies and validates fresh, upgrade, and disabled-service scenarios for Hermes and OpenClaw, while development scripts assert the updated Linux dry-run output. ChangesSystemd service restart behavior
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
scripts/install-openclaw-marmot.sh (1)
395-403: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider extracting shared installer logic.
enable_or_restart_systemd_user_serviceandinstall_linux_user_serviceare duplicated verbatim betweeninstall-hermes-marmot.shandinstall-openclaw-marmot.sh. While these are intentionally self-contained scripts, a sharedlibsourced at runtime could reduce maintenance risk when the systemd activation logic evolves.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/install-openclaw-marmot.sh` around lines 395 - 403, Extract the duplicated systemd installer helpers, including enable_or_restart_systemd_user_service and install_linux_user_service, into a shared runtime-sourced library used by both installer scripts. Remove their duplicate definitions from each script while preserving self-contained execution and the existing activation behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@scripts/install-openclaw-marmot.sh`:
- Around line 395-403: Extract the duplicated systemd installer helpers,
including enable_or_restart_systemd_user_service and install_linux_user_service,
into a shared runtime-sourced library used by both installer scripts. Remove
their duplicate definitions from each script while preserving self-contained
execution and the existing activation behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e321cdd7-0c57-4096-a88d-8c1f729453ff
📒 Files selected for processing (5)
integrations/hermes/marmot/tests/test_dev_scripts.shintegrations/openclaw/marmot/test/dev-scripts.shintegrations/test_installer_systemd_service.shscripts/install-hermes-marmot.shscripts/install-openclaw-marmot.sh
agent-p1p
left a comment
There was a problem hiding this comment.
Pip adversarial review
Head: 732f891a06250cde8054bdc79d6a46c463ce3354
BLOCKING
None.
SUGGESTION
None.
NITPICK
None.
Assessment
The active-service branch enables and restarts the existing unit after daemon-reload; the inactive/fresh branch retains enable --now. The upstream --no-start-wn-agent and --no-service gates still bypass service installation. The shared harness exercises the real installer control flow with exact systemctl call assertions for all four cases on both connectors.
The CodeRabbit shared-library nitpick is not requested: these are standalone release installers, and adding a runtime-sourced helper would increase installation failure surface for a small duplicated helper. The shared behavioral harness already guards drift.
Verification
bash integrations/test_installer_systemd_service.sh hermes— passbash integrations/test_installer_systemd_service.sh openclaw— passintegrations/hermes/marmot/tests/test_dev_scripts.sh— passintegrations/openclaw/marmot/test/dev-scripts.sh— pass; 196 tests passed, 1 skipped per setup run- shell syntax and
git diff --check— pass - GitHub checks — all completed checks green, including CodeRabbit
VERDICT: APPROVE
Sensitive paths: none under the task-configured sensitive-path rubric.
Summary
wn-agentsystemd user services after replacing their binaries and unitsenable --nowfor fresh/inactive installs--no-start-wn-agentand--no-servicebehaviorVerification
integrations/test_installer_systemd_service.sh hermesintegrations/test_installer_systemd_service.sh openclawintegrations/hermes/marmot/tests/test_dev_scripts.shintegrations/openclaw/marmot/test/dev-scripts.sh(196 passed, 1 skipped per setup run)just fast-ciFixes #834
Summary by CodeRabbit
New Features
Bug Fixes
Tests