Onboarding: add opt-in rescue watchdog for self-healing gateway recovery#44113
Onboarding: add opt-in rescue watchdog for self-healing gateway recovery#44113shichangs wants to merge 8 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR adds an opt-in rescue watchdog feature to The launchd security improvements ( Key issues found:
Confidence Score: 3/5
|
|
Addressed the 3 issues from Greptile review in commits
All 155 tests pass locally. |
|
@altaywtf @vincentkoc could you review this when you have a chance? This PR adds the opt-in rescue watchdog across onboarding, cron, and daemon flows. The earlier Greptile findings have been addressed in follow-up commits. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Closing this as duplicate or superseded after Codex automated review. PR #44113 should close as superseded by the later open split PR #46502. The original work is useful prior art and the author addressed review feedback, but current main still does not ship the rescue watchdog/onboarding surface, and #46502 is now the canonical thread for the core rescue watchdog service and cron engine. Best possible solution: Close #44113 and keep the active rescue watchdog review on open PR #46502. If #46502 lands, the onboarding flag, wizard prompt, JSON output, and docs from #44113 should come back as a smaller follow-up PR scoped to provisioning UX. What I checked:
So I’m closing this here and keeping the remaining discussion on the canonical linked item. Codex Review notes: model gpt-5.5, reasoning high; reviewed against ee2ab9a64492. |
AI-assisted: Yes (Codex). Fully tested locally.
Summary
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
openclaw onboardcan now offer an opt-in rescue watchdog during local onboarding.openclaw onboard --rescue-watchdogprovisions a second isolated rescue profile, managed gateway service, and rescue cron job.rescueWatchdogdetails when that option is enabled.Security Impact (required)
Yes/No): YesYes/No): YesYes/No): YesYes/No): YesYes/No): NoYes, explain risk + mitigation:This is an explicit opt-in feature that provisions a second local gateway profile with its own token, workspace, service, and cron job. The rescue profile does not clone channel/web config from the primary profile, does not deliver messages externally, and runs isolated cron checks against the primary profile only. Rescue auth-profile syncing preserves rescue-local credentials while merging inherited primary credentials. Environment variable allowlisting prevents sensitive vars from leaking across profiles. Command execution uses
process.execPathdirectly to avoid PATH injection.Repro + Verification
Environment
Steps
openclaw onboardwithout passing--rescue-watchdog.openclaw onboard --non-interactive --rescue-watchdog ....Expected
Actual
Evidence
All 155 rescue-related tests pass (
watchdog-shared,rescue-watchdog,onboard-rescue,onboard-rescue.setup,onboarding.finalize,launchd,service.jobs,normalize,register.onboard,local,local.run,daemon-install).Human Verification (required)
What you personally verified (not just CI), and how:
--rescue-watchdogis forwarded in CLI mode and remainsundefinedwhen not explicitly passed.runBoundedStepcallback correctly returnsPromise<void>(P1 fix from self-review).-rescueremain unsupported (no nested rescue).cause.Review Conversations
Compatibility / Migration
Yes/No): YesYes/No): Yes (newrescueWatchdogconfig section, opt-in only)Yes/No): NoFailure Recovery (if this breaks)
~/.openclaw-rescue*) and its managed gateway service definition.Risks and Mitigations
undefinedfor the unset case, and regression tests cover the prompt path.