Skip to content

fix(onboard): record Docker driver for macOS docker-driver sandboxes (#3728)#4221

Merged
cv merged 2 commits into
NVIDIA:mainfrom
yimoj:fix/3728-macos-docker-driver-runtime
May 27, 2026
Merged

fix(onboard): record Docker driver for macOS docker-driver sandboxes (#3728)#4221
cv merged 2 commits into
NVIDIA:mainfrom
yimoj:fix/3728-macos-docker-driver-runtime

Conversation

@yimoj

@yimoj yimoj commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #3728. On macOS arm64 (and any other host where the Docker-driver
gateway path is enabled), getSandboxRuntimeRegistryFields recorded
openshellDriver: "vm" based purely on process.platform === "darwin".
That mismatched the runtime — OpenShell's Docker-driver gateway always
starts with OPENSHELL_DRIVERS=docker (#3454) — and downstream code keyed
off openshellDriver === "vm" to run the VM-only DNS monkeypatch and emit
the misleading VM-driver warnings reported in the issue.

This change records "docker" on every Docker-driver host. The VM-only
log/warning paths are gated on openshellDriver === "vm", so they now
stay silent for macOS Docker-driver sandboxes. Legacy/opt-in sandboxes
that were already written to disk with openshellDriver: "vm" still
trigger the existing VM-only compatibility shim.

Changes

  • src/lib/onboard/sandbox-registry-metadata.ts — drop the
    process.platform === "darwin" ? "vm" : "docker" branch; record
    "docker" whenever isLinuxDockerDriverGatewayEnabled() is true.
  • src/lib/onboard/sandbox-registry-metadata.test.ts (new) — unit tests
    asserting macOS Docker-driver → "docker", Linux Docker-driver →
    "docker", and legacy Linux → "kubernetes".
  • src/lib/onboard/vm-dns-monkeypatch.test.ts — regression test that
    exercises the real applyOpenShellVmDnsMonkeypatch with
    openshellDriver: "docker" on a mocked darwin platform and verifies
    the onboard wrapper emits no logs or warnings.

Test plan

  • npm run typecheck:cli
  • npm run build:cli
  • npx vitest run src/lib/onboard/sandbox-registry-metadata.test.ts src/lib/onboard/vm-dns-monkeypatch.test.ts src/lib/actions/sandbox/vm-dns-monkeypatch.test.ts — 18/18 pass
  • cd nemoclaw && npm run build && npm test — 457/457 pass
  • npx @biomejs/biome check clean on touched files
  • Linux host can't reproduce the macOS-specific behavior directly, so
    the regression is covered by mocking process.platform (allowed
    by the issue brief).

Signed-off-by: Yimo Jiang yimoj@nvidia.com

Summary by CodeRabbit

  • Bug Fixes

    • Improved Docker and Kubernetes driver selection for sandbox runtime configuration.
    • Fixed DNS monkeypatch handling on macOS Docker-driver sandboxes.
    • Corrected platform-specific driver assignment logic for Linux and macOS environments.
  • Tests

    • Added comprehensive test coverage for driver selection across different platforms and configurations.

Review Change Stack

…VIDIA#3728)

The metadata helper mapped `process.platform === "darwin"` to
`openshellDriver: "vm"` even when the Docker-driver gateway path was
enabled. OpenShell's Docker-driver gateway always starts with
`OPENSHELL_DRIVERS=docker`, including on macOS arm64 (NVIDIA#3454), so a fresh
macOS sandbox onboarded today is a Docker sandbox, not a VM sandbox.

Recording `"vm"` made the post-create flow run the VM-only DNS
monkeypatch and surface its warning text for Docker-driver sandboxes,
which is what NVIDIA#3728 reports. Drop the platform branch so the docker-
driver path records `"docker"` on every supported host; legacy
opt-in/already-registered VM sandboxes still match the `"vm"` checks
they already wrote to disk.

Adds a unit test for the metadata helper and an onboard wrapper
regression test asserting macOS Docker-driver sandboxes emit no VM DNS
monkeypatch log/warn output. Host can't run macOS directly, so the
regression is covered via mocked `process.platform`.

Signed-off-by: Yimo Jiang <yimoj@nvidia.com>
@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 6d62779c-e3fb-4710-b5a4-a04652e1b90e

📥 Commits

Reviewing files that changed from the base of the PR and between 206737f and 4248b42.

📒 Files selected for processing (3)
  • src/lib/onboard/sandbox-registry-metadata.test.ts
  • src/lib/onboard/sandbox-registry-metadata.ts
  • src/lib/onboard/vm-dns-monkeypatch.test.ts

📝 Walkthrough

Walkthrough

The PR fixes macOS docker-driver sandboxes being misclassified as VM sandboxes, which caused spurious VM-driver path warnings during the onboard process. It simplifies driver classification logic in getSandboxRuntimeRegistryFields by removing darwin-specific "vm" handling and making the selection depend only on the docker-driver gateway flag, then validates the fix with comprehensive tests.

Changes

Driver classification and VM warning fixes

Layer / File(s) Summary
Driver classification logic and registry metadata tests
src/lib/onboard/sandbox-registry-metadata.ts, src/lib/onboard/sandbox-registry-metadata.test.ts
getSandboxRuntimeRegistryFields removes platform-specific "vm" classification. openshellDriver is now "docker" when isLinuxDockerDriverGatewayEnabled() is true, else "kubernetes". New test file validates driver selection on both macOS and Linux with gateway enabled and disabled scenarios.
VM DNS monkeypatch regression test
src/lib/onboard/vm-dns-monkeypatch.test.ts
Adds regression test for #3728 ensuring that macOS docker-driver sandboxes do not trigger the VM DNS monkeypatch warning path when openshellDriver is "docker" and platform is "darwin".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

Docker, fix, OpenShell, Sandbox, v0.0.51

Suggested reviewers

  • cv
  • ericksoa

Poem

🐰 A rabbit hops through Darwin's gate,
No "vm" signs to seal its fate,
Docker drives true, warnings gone,
The dashboard shines when onboard's done! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: recording the Docker driver for macOS docker-driver sandboxes, matching the primary fix in sandbox-registry-metadata.ts.
Linked Issues check ✅ Passed The PR addresses the first objective from #3728 by modifying how openshellDriver is recorded to prevent VM-driver warnings on macOS Docker-driver sandboxes, with comprehensive test coverage.
Out of Scope Changes check ✅ Passed All changes are scoped to addressing the VM-driver warning issue: metadata recording logic, unit tests, and regression tests directly support the primary objective.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Comment @coderabbitai help to get the list of available commands and usage tips.

@yimoj yimoj added the v0.0.51 Release target label May 26, 2026
@wscurran wscurran added Docker platform: macos Affects macOS, including Apple Silicon labels May 26, 2026
@wscurran

Copy link
Copy Markdown
Contributor

@cv cv added v0.0.52 Release target v0.0.53 Release target and removed v0.0.51 Release target v0.0.52 Release target labels May 26, 2026
@cv cv merged commit 01a967c into NVIDIA:main May 27, 2026
25 checks passed
cv pushed a commit that referenced this pull request May 27, 2026
## Summary
- Add the v0.0.53 release notes with the user-facing onboarding,
inference, policy, runtime, Hermes, and maintainer-tooling changes from
the release range.
- Refresh generated `nemoclaw-user-*` skills from the current Fern docs,
including already-merged policy, inference, troubleshooting, and
command-reference updates.
- Remove skipped experimental shield wording from generated-doc source
so the release-prep skip-term gate stays clean.

## Source summary
- #4197 -> `docs/about/release-notes.mdx`,
`docs/reference/commands.mdx`: Document pre-recreate workspace backup,
abort-on-partial-backup behavior, and
`NEMOCLAW_RECREATE_WITHOUT_BACKUP`.
- #4273 -> `docs/about/release-notes.mdx`,
`docs/reference/troubleshooting.mdx`: Document the under-provisioned
runtime prompt defaulting to abort in interactive onboarding.
- #4220 -> `docs/about/release-notes.mdx`,
`docs/network-policy/customize-network-policy.mdx`,
`docs/network-policy/integration-policy-examples.mdx`: Include the
`openclaw-pricing` preset and generated skill refresh.
- #4253 -> `docs/about/release-notes.mdx`,
`docs/inference/use-local-inference.mdx`,
`docs/inference/switch-inference-providers.mdx`: Carry the Ollama
runtime context-window docs into generated skills.
- #4298 -> `docs/about/release-notes.mdx`,
`docs/reference/troubleshooting.mdx`: Carry WSL Docker Desktop GPU
guidance into generated skills and release notes.
- #4297, #4210, #4221, #4225, #4288, #4306, #4311, #4319, #4342, #4284,
#3327 -> `docs/about/release-notes.mdx`: Summarize release-range fixes
and maintainer tooling changes that did not need new standalone docs
pages.

## Verification
- `python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix
nemoclaw-user --doc-platform fern-mdx`
- `rg "permissive mode|shields down|shields up|shields status|config
rotate-token|rotate-token" docs .agents/skills` returned no matches
outside `docs/.docs-skip`.
- `npm run docs` passes with full network access. Fern reports 0 errors
and one existing light-mode accent contrast warning.
- `FERN_VERSION=$(node -p "require('./fern/fern.config.json').version")
&& (cd fern && npx --yes "fern-api@${FERN_VERSION}" check --warnings)`
reports 0 errors and the same contrast warning.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Added v0.0.53 release notes with updates to onboarding, sandbox
recreation, and gateway handling
* Introduced `openclaw-pricing` preset for model pricing endpoint
management
* Clarified Ollama context window configuration and local model
validation behavior
* Updated sandbox recreation workflow documentation with backup/restore
details
* Enhanced interactive onboarding defaults for under-provisioned runtime
warnings
* Revised security guidance for configuration directory permissions and
immutability verification

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/NVIDIA/NemoClaw/pull/4360?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@wscurran wscurran added area: packaging Packages, images, registries, installers, or distribution bug-fix PR fixes a bug or regression platform: container Affects Docker, containerd, Podman, or images and removed area: packaging Packages, images, registries, installers, or distribution Docker labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PR fixes a bug or regression platform: container Affects Docker, containerd, Podman, or images platform: macos Affects macOS, including Apple Silicon v0.0.53 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[macOS][Onboard] docker-driver build prints VM-driver/port-forward/policy-race warnings

3 participants