fix(onboard): persist OpenClaw startup across restarts - #7970
Conversation
Signed-off-by: San Dang <sdang@nvidia.com>
📝 WalkthroughWalkthroughOpenClaw is now the default agent for Docker startup-command persistence. Onboard recreation tests verify the persisted command. Live survival tests capture diagnostics, run recovery, and validate restored OpenClaw state. ChangesOpenClaw sandbox persistence and recovery
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant SurvivalTest
participant HostCliClient
participant NemoClaw
participant CloudOpenClaw
SurvivalTest->>HostCliClient: Capture survival diagnostics
SurvivalTest->>HostCliClient: Restart gateway
SurvivalTest->>NemoClaw: Recover named sandbox
NemoClaw->>CloudOpenClaw: Restore sandbox state
SurvivalTest->>CloudOpenClaw: Validate cloud-openclaw-ready
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit 6a474f3 in the TypeScript / code-coverage/cliThe overall coverage in commit 6a474f3 in the Show a code coverage summary of the most impacted files.
Updated |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@test/e2e/live/sandbox-survival.test.ts`:
- Around line 37-115: Replace raw journal, Docker, process, and application log
collection in SURVIVAL_DIAGNOSTICS_SCRIPT with bounded, content-free metadata
such as statuses, identifiers, exit codes, and health results. Do not emit
credentials, tokens, request content, or unredacted child-process output; if any
raw output remains necessary, register every possible sensitive value with the
artifact redactor before collection, including values handled by the existing
apiKey redaction logic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 3b002bea-65ed-4fc8-82d2-de88fa19e505
📒 Files selected for processing (5)
src/lib/onboard/docker-startup-command-agent.tssrc/lib/onboard/sandbox-create-step.test.tstest/e2e/live/sandbox-survival.test.tstest/helpers/onboard-script-mocks.cjstest/onboard-sandbox-build.test.ts
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
Nemotron output stays in workflow artifacts and does not change the assessment above. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: 1 optional E2E recommendation
This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
Summary
An OpenShell Docker-driver sandbox can restart when its OpenShell gateway restarts. Default OpenClaw onboarding represented the agent as
null, so startup-command persistence skipped OpenClaw and left the container command assleep infinity. This change uses the existingnemoclaw-startpersistence path for default OpenClaw sandboxes.Changes
nullagent value as OpenClaw when Docker startup-command persistence is selected.nemoclaw-startin the recreated container.Type of Change
Quality Gates
nemoclaw-start, and legacy startup-command recovery. No command, option, configuration contract, or recovery procedure changed.Documentation Writer Review
no-docs-needed6a474f3a29784546e9caf28bd8de72341ea4386d. Existing docs cover OpenShell PID 1 launching nonrootnemoclaw-startand legacy startup-command recovery. The change adds no user command, option, configuration contract, recovery procedure, or support claim.DGX Station Hardware Evidence
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailablesandbox-create-step.test.tspassed 11 tests; the affected onboarding integration cluster passed 49 tests;npm run typecheck:clipassed.npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result: Required CI and exact-head live E2E are pending.npm run docsbuilds without warnings (doc changes only)Signed-off-by: San Dang sdang@nvidia.com
Summary by CodeRabbit
Bug Fixes
Tests