fix(sandbox): preserve Shields parent ownership on restart - #8767
Conversation
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
📝 WalkthroughWalkthroughThe PR adds an OpenShell/NemoClaw Docker compatibility correction. It omits ChangesOpenShell workspace compatibility
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant DockerInspection
participant CompatibilityResolver
participant DockerReplacement
participant ShieldsRecovery
DockerInspection->>CompatibilityResolver: inspect metadata and intended workload
CompatibilityResolver-->>DockerReplacement: omit OCI-user marker when boundary matches
DockerReplacement->>ShieldsRecovery: recreate and restart workload
ShieldsRecovery-->>DockerReplacement: runtime identity and /sandbox evidence
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
🌿 Preview your docs: https://nvidia-preview-pr-8767.docs.buildwithfern.com/nemoclaw |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/lib/onboard/docker-gpu-patch-clone.ts (1)
358-401: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winReduce complexity in
shouldOmitOpenShellOciImageUser.This resolver combines boundary detection, metadata extraction, legacy handling, and metadata validation. Extract the boundary check and identity-metadata validation into focused helpers. Keep this compatibility decision easy to audit.
As per coding guidelines, “Keep function complexity low; tracked existing complexity hotspots do not justify increasing complexity elsewhere.”
🤖 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/onboard/docker-gpu-patch-clone.ts` around lines 358 - 401, Refactor shouldOmitOpenShellOciImageUser by extracting the exactNemoClawBoundary detection into a focused helper and the OCI/sandbox identity metadata validation, including legacy handling, into another helper. Keep shouldOmitOpenShellOciImageUser as a concise coordinator that reuses these helpers and preserves the current return and error behavior.Source: Coding guidelines
🤖 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 `@src/lib/onboard/docker-gpu-patch-clone.ts`:
- Around line 358-401: Refactor shouldOmitOpenShellOciImageUser by extracting
the exactNemoClawBoundary detection into a focused helper and the OCI/sandbox
identity metadata validation, including legacy handling, into another helper.
Keep shouldOmitOpenShellOciImageUser as a concise coordinator that reuses these
helpers and preserves the current return and error behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 465daef0-cc7d-44c5-96a8-a24a24215f7b
📒 Files selected for processing (11)
ci/source-shape-test-budget.jsondocs/security/openshell-0.0.101-migration-review.mddocs/security/openshell-0.0.99-migration-review.mdsrc/lib/onboard/docker-gpu-patch-clone.test.tssrc/lib/onboard/docker-gpu-patch-clone.tssrc/lib/onboard/managed-bootstrap/docker-test-fixture.tssrc/lib/onboard/managed-bootstrap/docker.test.tssrc/lib/onboard/managed-bootstrap/docker.tstest/e2e/live/hermes-shields-config.test.tstest/e2e/live/shields-config.test.tstest/openshell-0.0.99-migration-review.test.ts
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
4 terminology differences from the second opinionAdvisory only. These are normalized differences from the primary terminology receipt.
Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests. 3 semantic terminology decisionsTerminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.
E2E guidanceAdvisory only. A maintainer can dispatch the default E2E suite against this exact revision. 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. |
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary This PR updates the August 10, 2026 v0.0.106 release entry with gateway readiness fixes that merged after PR #8756. PRs #8765, #8767, and #8768 remain outside this entry because they are open and do not carry the `v0.0.106` release label. ## Changes - Document acceptance of OpenShell v0.0.101 `Server:` endpoint output and target-bound process tags when trusted listener evidence matches the configured gateway. - Document preservation of selected-gateway stale state so onboarding can reconcile a registered gateway when a gateway-scoped OpenShell status check cannot connect. - Record evidence-backed exclusions for internal image, startup, qualification, proxy-environment, CI, and test-harness changes in PRs #8754, #8609, #8762, #8432, #8766, and #8581. - Exclude PRs #8765, #8767, and #8768 because their changes are absent from `main` and the PRs do not carry the `v0.0.106` release label. The release entry must be updated after any of those PRs merges for v0.0.106. ## 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 dated changelog SPDX placement, version headings, forbidden terms, and link form. - [ ] 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-08-10.mdx`; an independent Codex Desktop subagent reviewed the writing rules and documentation style, terminology, structure, voice, code-sample presentation, links, source and test accuracy, release meaning, product scope, and evidence-backed exclusions at commit `190bf882c`. - Agent: Codex Desktop <!-- docs-review-head-sha: 190bf88 --> <!-- docs-review-agents-blob-sha: c4923a3 --> ## 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 — command/result or justification: `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 applicable to a documentation-only release-entry update. - [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) — result: passed with 0 errors and 2 existing 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) — no page was added. --- Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved gateway readiness detection for OpenShell v0.0.101 endpoint output. * Process tags are now accepted only when they match trusted listener information for the configured gateway. * Preserved stale gateway status during connection failures to support accurate onboarding reconciliation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Carlos Villela <cvillela@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Completes the v0.0.106 changelog for four user-visible changes that merged before the tag but were omitted from the pre-tag entry. Keeps public security pages focused on operator guidance by relocating maintenance contracts to contributor guidance and the owning OpenClaw dependency review. Records PR #8753's portable inference descriptor as Experimental while leaving its existing workflow documentation unchanged. ## Changes - Add managed-container restart-transition recovery from PR #8765, Shields parent-owner preservation from PR #8767, and managed storage remediation plus NVIDIA driver parsing from PR #8768 to the canonical v0.0.106 entry. - Add the Experimental portable inference descriptor from PR #8753 to the v0.0.106 entry, including its short-lived credential boundary, manual standby behavior, and owning setup page. - Keep Process Controls focused on the operator-facing immutable-image boundary and move the blueprint image-pin maintenance contract to `CONTRIBUTING.md`. - Keep Gateway and Secret Controls focused on operator actions and move the OpenClaw audit-suppression tests and distinct removal conditions to the owning OpenClaw 2026.7.1 dependency review. ## 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: the dated-changelog, published-route, and documentation-link tests cover the changed release entry and links. - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [x] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: an independent Codex Desktop documentation writer reviewed exact head `bbfed36ca`; the review verified the operator-facing security claims, the distinct `allowInsecureAuth` and device-auth suppression removal conditions against their generator branches, and the confirmed Experimental #8753 release claim. No runtime or policy behavior changes. - [ ] 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: `CONTRIBUTING.md`, `docs/changelog/2026-08-10.mdx`, `docs/security/gateway-authentication-controls.mdx`, `docs/security/openclaw-2026.7.1-dependency-review.md`, and `docs/security/process-controls.mdx`; the subagent reviewed `docs/CONTRIBUTING.md`, `WRITING.md`, terminology, structure, voice, code-sample presentation, canonical ownership, factual accuracy, and product scope. - Agent: Codex Desktop <!-- docs-review-head-sha: bbfed36 --> <!-- docs-review-agents-blob-sha: c4923a3 --> ## 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 — command/result or justification: `npx vitest run test/changelog-docs.test.ts test/check-docs-published-routes.test.ts test/check-docs-links.test.ts` passed; `npm run docs` and `git diff --check` passed again after the review correction. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: not applicable to this bounded 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) — result: passed with zero errors and the existing light-mode accent contrast warning. - [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) — no new pages. --- Signed-off-by: Miyoung Choi <miyoungc@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Documented requirements for keeping managed sandbox image digest pins synchronized and immutable. - Added guidance for validating custom images and using reviewed image sources during onboarding. - Expanded release notes with portable inference profiles, endpoint references, cleanup behavior, startup handling, and installer details. - Updated security documentation with current dependency-review information and authentication-control boundaries. - Clarified sandbox ownership, permissions, workload identity, and managed-container restart behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
Summary
OpenShell 0.0.99 began preparing its default
/sandboxworkspace when Docker suppliesOPENSHELL_OCI_IMAGE_USER; after a Shields up restart, that preparation changes the protected parent fromroot:sandboxtosandbox:sandboxbefore the workload starts and leaves the container restarting. This change preserves the protected parent by omitting only that marker at NemoClaw's exact reviewed Docker recreation boundary while keeping the explicitsandbox:sandboxworkload policy and/sandboxruntime contract.Related Issue
Follow-up to #8662. Complementary to #8765, which covers supervisor recovery after transient process exits rather than the pre-workload workspace ownership change.
Changes
OPENSHELL_OCI_IMAGE_USER; malformed or partial metadata fails before cutover. Focused clone and managed-bootstrap environment-delta tests protect this boundary.sandbox:sandboxprocess identity, and verify the replacement still preserves empty driver UID/GID markers plus every unrelated environment entry./sandboxremains1775 root:sandboxafter a Shields up restart.Type of Change
Quality Gates
Documentation Writer Review
docs-updateddocs/security/openshell-0.0.99-migration-review.md;docs/security/openshell-0.0.101-migration-review.mdDGX 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 unavailablenpm exec -- vitest run src/lib/onboard/docker-gpu-patch-clone.test.ts src/lib/onboard/managed-bootstrap/docker.test.ts test/openshell-0.0.99-migration-review.test.ts test/openshell-0.0.101-migration-review.test.ts --maxWorkers=2(67 passed); source-shape review tests (35 passed);npm run typecheck:cli;npm run checks:repository; andnpm run test:e2e-phases:checkpassed;npm exec -- vitest run --project e2e-support test/e2e/support/shields-failed-startup.test.tspassed 10 focused tests.npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)npm run docscompleted with zero errors and two existing Fern warnings.Signed-off-by: Julie Yaunches jyaunches@nvidia.com
Summary by CodeRabbit
Bug Fixes
/sandboxownership, permissions, and runtime identity during container replacement.Diagnostics
Documentation