fix(status): recover visible post-reboot sandbox - #7848
Conversation
Sensitive-path security reviewReviewed exact head Files reviewed:
Result: PASS — no security findings.
Validation evidence:
|
📝 WalkthroughWalkthrough
ChangesOpenClaw delivery recovery
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant StatusCommand
participant collectSandboxStatusSnapshot
participant recoverSandboxProcesses
participant InferenceGatewayProbe
StatusCommand->>collectSandboxStatusSnapshot: collect status
collectSandboxStatusSnapshot->>recoverSandboxProcesses: recover OpenClaw gateway and host forward
recoverSandboxProcesses-->>collectSandboxStatusSnapshot: delivery-chain recovery result
collectSandboxStatusSnapshot->>InferenceGatewayProbe: probe gateway when delivery is proven
collectSandboxStatusSnapshot-->>StatusCommand: present or recovery failure
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit caeacc1 in the TypeScript / code-coverage/cliThe overall coverage in commit caeacc1 in the Show a code coverage summary of the most impacted files.
Updated |
|
🌿 Preview your docs: https://nvidia-preview-pr-7848.docs.buildwithfern.com/nemoclaw |
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 warning · 0 suggestionsWarningsWarnings do not block.
|
Sensitive-path security reviewReviewed exact head Files reviewed:
Result: PASS — no security findings.
Validation evidence:
|
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 `@src/lib/actions/sandbox/status-snapshot-recovery.test.ts`:
- Around line 126-148: The parameterized precedence tests in
src/lib/actions/sandbox/status-snapshot-recovery.test.ts:126-148 must assert
that snapshot output retains `Phase: ${phase}` in addition to the existing
recovery and lookup assertions. The related test at
src/lib/actions/sandbox/status-snapshot-recovery.test.ts:150-172 must assert the
observable preflight behavior, including suppression of the inference-gateway
probe, while preserving its existing expectations.
🪄 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: 44830d0f-ec06-4938-a003-684a8c5adb43
📒 Files selected for processing (3)
docs/reference/commands.mdxsrc/lib/actions/sandbox/status-snapshot-recovery.test.tssrc/lib/actions/sandbox/status-snapshot.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/reference/commands.mdx
| it.each([ | ||
| "Provisioning", | ||
| "Failed", | ||
| ])("keeps the existing %s phase diagnosis ahead of markerless recovery (#7824)", async (phase) => { | ||
| const deps = { | ||
| ...snapshotDeps({ | ||
| checked: true, | ||
| wasRunning: false, | ||
| recovered: false, | ||
| forwardRecovered: false, | ||
| }), | ||
| reconcile: () => | ||
| Promise.resolve({ | ||
| state: "present" as const, | ||
| output: `Phase: ${phase}`, | ||
| }), | ||
| }; | ||
|
|
||
| const snapshot = await collectSandboxStatusSnapshot("alpha", { deps }); | ||
|
|
||
| expect(deps.recoverSandboxProcesses).not.toHaveBeenCalled(); | ||
| expect(snapshot.lookup.state).toBe("present"); | ||
| }); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Strengthen the precedence regression assertions.
Both tests currently prove only that recovery was skipped and the lookup remained present; they do not prove that the existing diagnosis or preflight behavior was preserved.
src/lib/actions/sandbox/status-snapshot-recovery.test.ts#L126-L148: assert that the output retainsPhase: ${phase}.src/lib/actions/sandbox/status-snapshot-recovery.test.ts#L150-L172: assert the observable preflight effect, such as inference-gateway probe suppression.
📍 Affects 1 file
src/lib/actions/sandbox/status-snapshot-recovery.test.ts#L126-L148(this comment)src/lib/actions/sandbox/status-snapshot-recovery.test.ts#L150-L172
🤖 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 `@src/lib/actions/sandbox/status-snapshot-recovery.test.ts` around lines 126 -
148, The parameterized precedence tests in
src/lib/actions/sandbox/status-snapshot-recovery.test.ts:126-148 must assert
that snapshot output retains `Phase: ${phase}` in addition to the existing
recovery and lookup assertions. The related test at
src/lib/actions/sandbox/status-snapshot-recovery.test.ts:150-172 must assert the
observable preflight behavior, including suppression of the inference-gateway
probe, while preserving its existing expectations.
Source: Path instructions
Sensitive-path security reviewReviewed exact head Files reviewed:
Result: PASS — no security findings.
Validation evidence:
|
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Exact-head security review — caeacc1Verdict: PASS. No security findings. The change remains fail-closed: it retries only the exact same-sandbox OpenShell phase Error refusal for the read-only true probe, while all broader transient signatures still require empty stdout and all unrelated failures remain terminal.
Files reviewed: docs/reference/commands.mdx; src/lib/actions/sandbox/process-recovery.ts and its test; status-snapshot.ts and recovery tests; status-lookup-rendering.ts; status-flow.test.ts; test/cli/sandbox-status-json.test.ts. Evidence: exact-head diff and all changed files reviewed; git diff --check passed; process-recovery 43/43 passed; CLI type-check passed; commit hooks passed; GitHub verification is valid. |
<!-- markdownlint-disable MD041 --> ## Summary Add the canonical pre-tag release entry for NemoClaw v0.0.98. The dated entry records the user-visible changes merged after v0.0.97 and links each release theme to its published documentation. ## Changes - Add `docs/changelog/2026-07-29.mdx` with the exact `## v0.0.98` release heading. - Summarize Hermes 0.19, Deep Agents Code automation and skill safety, readiness diagnostics, lifecycle recovery, uninstall behavior, messaging conflicts, dependency hardening, and bounded diagnostics. - Use the parser-safe MDX SPDX comment and root-absolute routes for published OpenClaw, Hermes, and Deep Agents documentation. ### Source summary - [#7849](#7849) -> `docs/changelog/2026-07-29.mdx`: Record the Hermes 0.19 runtime migration repairs for cron state, dashboard seeding, and MCP naming. - [#7662](#7662) -> `docs/changelog/2026-07-29.mdx`: Record bounded gateway and Docker subprocess diagnostics. - [#7850](#7850) -> `docs/changelog/2026-07-29.mdx`: Record verified no-clobber Deep Agents Code skill installation. - [#7848](#7848) -> `docs/changelog/2026-07-29.mdx`: Record post-reboot delivery-chain recovery for visible OpenClaw sandboxes. - [#7831](#7831) -> `docs/changelog/2026-07-29.mdx`: Record OpenShell gateway-state preservation during uninstall. - [#7827](#7827) -> `docs/changelog/2026-07-29.mdx`: Record the removal of upstream test sources from published Hermes images. - [#7775](#7775) -> `docs/changelog/2026-07-29.mdx`: Record the blocking diagnostic for unsupported `DOCKER_HOST` values. - [#7833](#7833) -> `docs/changelog/2026-07-29.mdx`: Record reviewed Python dependency baselines for Hermes and Deep Agents Code images. - [#7771](#7771) -> `docs/changelog/2026-07-29.mdx`: Record the managed Hermes Agent 0.19.0 upgrade. - [#7811](#7811) -> `docs/changelog/2026-07-29.mdx`: Record fail-closed messaging channel conflict handling. - [#7797](#7797) -> `docs/changelog/2026-07-29.mdx`: Record the managed non-interactive Deep Agents Code JSON envelope. - [#7782](#7782) -> `docs/changelog/2026-07-29.mdx`: Record the storage-remediation readiness capability. - [#7784](#7784) -> `docs/changelog/2026-07-29.mdx`: Record the 120-second OpenShell readiness budget for sandbox recreation. - [#7810](#7810) -> `docs/changelog/2026-07-29.mdx`: Record rejection of stale Deep Agents Code security inventories. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [ ] Tests added or updated for changed behavior - [x] Existing tests cover changed behavior — justification: `test/changelog-docs.test.ts` validates the native changelog contract, including the version heading, MDX SPDX comment, and published routes. - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Documentation Writer Review - [x] Documentation writer subagent reviewed the completed changes - Result: `docs-updated` - Evidence: `docs/changelog/2026-07-29.mdx` was reviewed against `docs/CONTRIBUTING.md` and `WRITING.md` for release meaning, terminology, structure, voice, sentence form, MDX structure, published routes, and code-sample presentation. The changelog contract passed 6 tests. The docs build completed with 0 errors and 2 existing Fern warnings. - Agent: Codex CLI <!-- docs-review-head-sha: e3221d1 --> <!-- docs-review-agents-blob-sha: c052d60 --> ## DGX Station Hardware Evidence - [ ] Tested on DGX Station - Tested commit: Not applicable. `scripts/prepare-dgx-station-host.sh` is unchanged. - Station profile/scenario: Not applicable. - Result: Not applicable. - Supporting evidence: Not applicable. ## Verification - [x] PR description includes a `Signed-off-by:` line and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run validate:pr` passed after refreshing `origin/main` when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — `npx vitest run test/changelog-docs.test.ts` passed 6 tests. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: Not run for this documentation-only change. - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — The build completed with 0 errors and 2 existing Fern warnings. - [x] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) — Native changelog entries use the required parser-safe MDX SPDX comment and do not use frontmatter. --- Signed-off-by: San Dang <sdang@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added managed Hermes upgrades with verified releases, version reporting, and preserved configuration contracts. - Improved Deep Agents Code JSON output and skill installation behavior. - Added clearer Docker host and system readiness reporting. - Improved post-reboot delivery recovery and sandbox readiness timing. - **Bug Fixes** - Preserved gateway state when uninstalling with `--keep-openshell`. - Prevented conflicting messaging credentials from blocking onboarding and rebuilds. - Improved gateway diagnostics, dependency security, runtime filesystem protection, and evidence handling. - **Documentation** - Published the v0.0.98 release notes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
#7947) <!-- markdownlint-disable MD041 --> ## Summary Documents the user-facing changes identified by the `v0.0.96..v0.0.97` post-tag audit and publishes the existing agentic-documentation guide in each documentation variant. Replaces repository-local DORI contributor classification state with current-host capability detection so fresh worktrees do not repeatedly prompt users. Links the internal Skill Library and Template Library for explicit setup requests. Adds the bounded `v0.0.98..v0.0.99` audit follow-ups for changelog accuracy, memory-search prerequisites, two-DGX Station route verification, and prose clarity. ## Changes - Document the `invalid_docker_host` recovery procedure from #7775 and the `sandbox_recovery_failed` state from #7848. - Move Deep Agents runtime, automation, supervision, approval, and identity guidance from the quickstart to a focused operation page while preserving the existing anchor. - Publish the existing `docs/resources/engineer-agentic-documentation.mdx` page under Resources in all guide variants and align its route description with the live TOC. - Add rendered-page route tests for the Deep Agents operation page, compatibility anchor, and agentic-documentation routes. - Select the DORI documentation workflow from current host capabilities. Use the checked-in writing guide when the verified NVIDIA Skill Library is unavailable, and reserve DORI setup for explicit installation or configuration requests. - Link the NVIDIA Skill Library and Template Library from the DORI setup guide with their distinct installation roles. - Correct the Hermes dependency-review punctuation identified by the audit. - Correct the `v0.0.99` changelog attribution for the focused runtime identity, two-DGX Station vLLM, and memory search pages. - State the already-running Ollama embedding prerequisite and `/api/tags` acceptance criterion for memory search. - Add post-install route and runtime verification for the two-DGX Station vLLM procedure, including the limits of the `reachable` status. - Split dense Microsoft Entra and Hermes configuration-root explanations without changing their supported behavior or information architecture. - Reserve `sandbox_recovery_failed` guidance for an unproven agent delivery chain and keep Docker readiness failures under their separate preflight layers. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Documentation Writer Review - [x] Documentation writer subagent reviewed the completed changes - Result: `docs-updated` - Evidence: Reviewed the full effective 17-file PR diff, including `.gitignore`, `AGENTS.md`, `docs/AGENTS.md`, `docs/DORI_SETUP.md`, `docs/index.yml`, `docs/changelog/2026-07-30.mdx`, `docs/configure-agents/configure-memory-search.mdx`, `docs/get-started/quickstart-langchain-deepagents-code.mdx`, `docs/inference/set-up-vllm-on-two-dgx-stations.mdx`, `docs/manage-sandboxes/run-deep-agents-code.mdx`, `docs/reference/commands.mdx`, `docs/reference/configure-runtime-identity.mdx`, `docs/reference/troubleshooting.mdx`, `docs/resources/engineer-agentic-documentation.mdx`, `docs/security/hermes-0.19.0-dependency-review.md`, `scripts/check-docs-published-routes.mts`, and `test/check-docs-published-routes.test.ts`. The independent reviewer checked product scope, writing rules, documentation style, terminology, structure, voice, code samples, prerequisites, risks, navigation, routes, guide variants, and source-backed technical claims. The headless mutation warning now precedes the first `dcode -n` command. Plugin build passed; the focused six-file Vitest suite passed 88 tests; `npm run docs` passed with 65 guarded routes and 0 Fern errors. Final result: PASS on `d65f1793`. - Agent: Codex Desktop <!-- docs-review-head-sha: d65f179 --> <!-- docs-review-agents-blob-sha: 3dd7c24 --> ## DGX Station Hardware Evidence - [ ] Tested on DGX Station - Tested commit: - Station profile/scenario: - Result: - Supporting evidence: ## Verification - [x] PR description includes a `Signed-off-by:` line and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run validate:pr` passed after refreshing `origin/main` when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — `npx vitest run test/changelog-docs.test.ts test/station-doc-ownership.test.ts test/inference-options-docs.test.ts test/check-docs-links.test.ts test/sync-agent-variant-docs.test.ts` passed 58 tests on the reviewed head. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — not applicable because this PR does not change runtime behavior or repository-wide validation. - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — it passed with 0 errors and the existing Fern CLI upgrade warning. - [x] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [x] New doc pages include SPDX header and frontmatter (new pages only) --- Signed-off-by: Miyoung Choi <miyoungc@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Added a comprehensive guide for running Deep Agents Code in managed sandboxes, including interactive, headless, JSON, approval, and troubleshooting workflows. - Added navigation links for Deep Agents, OpenClaw, and Hermes resources. - Simplified the Deep Agents quickstart and linked to the dedicated runtime guide. - Updated command references and documented recovery status handling. - Added guidance for resolving invalid Docker host configuration errors. - Clarified documentation routing and setup guidance. - **Tests** - Added coverage to validate published documentation routes and links. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Miyoung Choi <miyoungc@nvidia.com> Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com> Co-authored-by: Senthil Ravichandran <senthilr@nvidia.com>
Summary
After a host reboot, OpenShell can restart a registered Docker sandbox and report it
Readybefore the managed OpenClaw gateway and host forward are restored. Status previously ran guarded delivery-chain recovery only when sandbox lookup itself had recovered a missing sandbox, so this visible-sandbox case could exit successfully while the gateway remained unreachable.Status now proves or recovers the managed OpenClaw gateway and host forward for a present,
ReadyDocker/OpenClaw sandbox with a clear host preflight. It fails closed withsandbox_recovery_failedwhen that delivery chain cannot be proven, preserves higher-priority host and non-Ready diagnostics, and only claims Docker restoration when lookup actually recovered the sandbox.The exact E2E then exposed a second production defect in the existing direct-recreation path: OpenShell can emit informational stdout while refusing the read-only readiness probe with the exact same-sandbox
phase: Errorresponse. The retry classifier required empty stdout and therefore treated that transient re-registration state as terminal. It now retries only that exact refusal; broader signatures remain constrained and unrelated errors remain terminal.Related Issue
Fixes #7824
Changes
ReadyDocker/OpenClaw sandboxes with a clear host preflight even when lookup did not recover the sandbox.phase: Errorre-registration refusal even when the CLI also emits informational stdout.Type of Change
Quality Gates
Documentation Writer Review
docs-updateddocs/reference/commands.mdxalready documents the observable present-and-Ready OpenClaw recovery and fail-closed contract; no additional docs change was needed for the exact retry-classifier follow-up. Writing review found no issues. Biome, focused tests, CLI type-check, and hooks passed.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 unavailableprocess-recovery.test.tspassed 43/43; prior focused status source tests passed 46/46; exact CI integration files passed 8/8 and 18/18.npm run test:changedpassed 692/693 with one unrelated 5-second snapshot timeout that passed immediately in isolation.ubuntu-repo-docker-post-reboot-recoveryoncaeacc131b387d7db81d4e0f0d15ea4706944fe2. Artifact evidence records post-rebootnemoclaw statusexiting 0 with OpenClaw running and Docker healthy, followed by an HTTP 200 gateway probe.npm run docsbuilds without warnings (doc changes only)Signed-off-by: Julie Yaunches jyaunches@nvidia.com