Skip to content

feat(onboard): add inactive OpenShell MXC provider - #8271

Merged
senthilr-nv merged 11 commits into
mainfrom
codex/windows-mxc-inactive-provider
Aug 5, 2026
Merged

feat(onboard): add inactive OpenShell MXC provider#8271
senthilr-nv merged 11 commits into
mainfrom
codex/windows-mxc-inactive-provider

Conversation

@senthilr-nv

@senthilr-nv senthilr-nv commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds an inactive OpenShell MXC runtime-provider candidate for native Windows/OpenClaw work. The candidate consumes the merged host-qualification and native-artifact contracts, but remains absent from production selection and fails closed for every unqualified lifecycle or mutation surface.

Related Issue

Related to #8178.

Changes

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: MXC remains absent from CURRENT_RUNTIME_PROVIDER_BUNDLES, has no production import or selection path, and exposes no CLI, configuration, workflow, or supported behavior.
  • 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: Exact-head nine-category security review PASS at 8e8a32b73bbc9938018a0980d2a99f0f74720f4e against base 962f1c3bf3a1354a8cfdc2056e04a27828be0dc0. The effective binary diff SHA-256 remains 157885993ef0731db6b77653e778b296d1f15b786431b64832e9da4e3aff42ca, identical to the previously reviewed patch. MXC remains unregistered and unselectable; the strict native-receipt parser and Docker rejection are unchanged; lifecycle and mutation operations fail closed. The merge adds only current-main history outside the effective diff. No secrets, dependencies, network calls, privilege paths, credential handling, authentication, or cryptography changed.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: no-docs-needed
  • Evidence: Reviewed exact base 0385c0423125abbb29aa6028877c3e5c34ef8b46 through head 8239b1ad312d3e8278f4945537b6264dba405dc2. The immutable compare contains 14 source and test files with 469 insertions and 11 deletions; it contains no documentation or Fern files. CURRENT_RUNTIME_PROVIDER_BUNDLES still registers only Docker and Kubernetes, so MXC remains unregistered and unselectable. Issue [Epic] Support native Windows through OpenShell MXC #8178 explicitly sequences feat(onboard): add inactive OpenShell MXC provider #8271 as an inactive provider slice and keeps activation and support documentation gated on later package contracts and protected Windows/MXC/OpenClaw live E2E. Changed comments, diagnostics, and behavior-oriented test titles have no writing findings. No user-facing command, configuration, workflow, default, error, or supported behavior changed. A docs build is not applicable.
  • Agent: Codex Desktop

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

  • PR description includes a Signed-off-by: line and every published commit appears as Verified in GitHub
  • 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
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — exact head 8e8a32b73: 4 focused files and 64 tests passed. npm run build:cli, npm run typecheck:cli, npm run validate:pr, and git diff --check passed. The effective patch is byte-identical to the previously 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 the provider is inactive and unregistered; protected CI is authoritative for the complete repository matrix.
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Senthil Ravichandran senthilr@nvidia.com

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds native-artifact workload contracts, parsing, validation, sandbox compatibility, and an inactive OpenShell MXC runtime provider for Windows x64 OpenClaw agents.

Changes

Native-artifact and MXC provider support

Layer / File(s) Summary
Native-artifact contracts and registration validation
src/lib/onboard/runtime-provider/contract.ts, src/lib/onboard/runtime-provider/registry.ts, src/lib/state/registry/types.ts, src/lib/onboard/workload/native-artifact.ts
Workload profiles and receipt unions include native-artifact support. Registration validates platform, agent, digest, and contract-version metadata.
Receipt parsing and provider acceptance
src/lib/state/registry/workload.ts, test/helpers/runtime-provider-bundle.ts, src/lib/onboard/runtime-provider/docker.ts
Native-artifact receipts are parsed and cloned. Provider acceptance requires matching native-artifact metadata. Docker rejects native-artifact receipts.
MXC provider bundle
src/lib/onboard/runtime-provider/mxc.ts
Adds an inactive MXC provider candidate with Windows host checks, OpenShell metadata, and explicit unsupported operations.
MXC provider validation
src/lib/onboard/runtime-provider/mxc.test.ts, test/runtime-provider-source-shape.test.ts, src/lib/onboard/workload/native-artifact-test-fixture.ts
Tests cover provider identity, receipt validation, host preflight, fail-closed operations, registry rejection, provider inventory, and native-artifact receipt construction.
Sandbox workload compatibility
src/lib/onboard/sandbox-recreate-transaction.ts, src/lib/onboard/sandbox-recreate-transaction.test.ts, src/lib/onboard/sandbox-workload-authority.test.ts
Sandbox recreation preserves non-legacy workloads and safely handles native-artifact workloads without image references.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Receipt as Native-artifact receipt
  participant Workload as Workload parser
  participant Registry as Runtime-provider registry
  participant MXC as MXC provider
  Receipt->>Workload: Parse and clone receipt
  Workload-->>MXC: Return validated workload receipt
  MXC->>Registry: Register provider profile
  Registry->>Registry: Validate native-artifact metadata
  MXC-->>Receipt: Accept matching platform, agent, and contracts
Loading

Possibly related issues

Possibly related PRs

  • NVIDIA/NemoClaw#8261: Both changes extend runtime-provider contracts, Docker handling, and registry validation for workload capabilities.

Suggested labels: feature

Suggested reviewers: apurvvkumaria, cv

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% 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
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the addition of the inactive OpenShell MXC provider, which is the main change.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/windows-mxc-inactive-provider

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

@senthilr-nv senthilr-nv added area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow platform: windows Affects native Windows environments integration: openclaw OpenClaw integration behavior labels Aug 4, 2026
@senthilr-nv senthilr-nv self-assigned this Aug 4, 2026
@github-code-quality

github-code-quality Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 8239b1a in the codex/windows-mxc-in... branch remains at 96%, unchanged from commit 271c4d1 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 8239b1a in the codex/windows-mxc-in... branch remains at 81%, unchanged from commit 962f1c3 in the main branch.

Show a code coverage summary of the most impacted files.
File main 962f1c3 codex/windows-mxc-in... 8239b1a +/-
src/lib/onboard...ive-artifact.ts 93% 86% -7%
src/lib/onboard...e-patch-flow.ts 76% 71% -5%
src/lib/inferen...vider-models.ts 69% 68% -1%
src/lib/inferen...y-production.ts 48% 48% 0%
src/lib/onboard...der/registry.ts 97% 97% 0%
src/lib/inferen...er-discovery.ts 87% 88% +1%
src/lib/tunnel/services.ts 76% 80% +4%
src/lib/platform.ts 84% 89% +5%
src/lib/onboard...provider/mxc.ts 0% 100% +100%
src/lib/onboard...test-fixture.ts 0% 100% +100%

Updated August 05, 2026 05:52 UTC

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (4)
src/lib/onboard/runtime-provider/contract.ts (1)

85-86: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider one absence representation for nativeArtifactSupport.

Line 85 declares support as required and nullable. Line 86 declares nativeArtifactSupport as optional and nullable. This creates two ways to express "no native-artifact support" and forces every consumer to handle both. registry.ts already tests !== undefined && !== null for this reason.

If no persisted profile shape requires the optional form, declare the field required and nullable to match support.

♻️ Proposed alignment with the sibling field
 export interface RuntimeProviderWorkloadProfile {
   readonly support: RuntimeProviderManagedImageSupport | null;
-  readonly nativeArtifactSupport?: RuntimeProviderNativeArtifactSupport | null;
+  readonly nativeArtifactSupport: RuntimeProviderNativeArtifactSupport | null;
   readonly hostArchitectures: readonly string[];

This change requires docker.ts and any other profile literal to set nativeArtifactSupport: null explicitly.

🤖 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/runtime-provider/contract.ts` around lines 85 - 86, Make
nativeArtifactSupport required but nullable in the runtime provider contract,
matching the support field and using null as the sole absence representation.
Update docker.ts and every runtime provider profile literal to explicitly set
nativeArtifactSupport: null when unsupported, and adjust affected consumers to
rely on the required nullable field.
src/lib/onboard/runtime-provider/registry.ts (2)

230-230: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document why the native-artifact block precedes the support === null return.

The placement at line 230 is load-bearing. MXC_NATIVE_ARTIFACT_PROFILE sets support: null, so the early return at line 268 would skip native-artifact validation if the new block moved below it. A future reader could reorder these blocks and silently disable the check.

Add a short comment that states the ordering requirement.

♻️ Proposed comment
+  // Validate native-artifact support before the managed-image early return.
+  // Native-artifact providers such as `mxc` set `support: null`.
   if (profile.nativeArtifactSupport !== undefined && profile.nativeArtifactSupport !== null) {

Also applies to: 268-268

🤖 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/runtime-provider/registry.ts` at line 230, In the
runtime-provider profile handling around the nativeArtifactSupport check and the
support === null early return, add a short comment explaining that
native-artifact validation must remain before the null-support return because
MXC_NATIVE_ARTIFACT_PROFILE uses support: null; preserve the existing ordering
and behavior.

237-266: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract the shared support-block validator.

Lines 237-266 repeat the structure of the managed-image validator at lines 275-298: a boolean exactDigestReferences, a non-empty unique allowlisted identity array, and a loop over version arrays that requires non-empty unique positive safe integers. The two blocks now differ only in the allowlist, the field names, and the error text.

Extract one helper that takes the record, the allowlist sets, the version field names, and an error-message prefix. Both call sites then stay in sync when a rule changes.

🤖 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/runtime-provider/registry.ts` around lines 237 - 266, Extract
the duplicated validation logic from the native-artifact block and the
managed-image block into one shared support-block validator. Parameterize it
with the support record, platform and agent allowlists, version field names, and
error-message prefix, then update both call sites to use it while preserving the
existing boolean, non-empty unique allowlisted arrays, and positive safe-integer
version checks.
src/lib/state/registry/workload.ts (1)

13-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff

Move the native-artifact receipt contract and parser to a shared module.

src/lib/state/registry/types.ts and src/lib/state/registry/workload.ts currently depend on the transitional src/lib/onboard/workload/native-artifact.ts. This specific module has no path back to src/lib/state, but the two directories already have other bidirectional dependencies, including state/onboard-session.ts and onboard/machine/events.ts. Keep the persisted receipt contract outside onboard and update its callers.

🤖 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/state/registry/workload.ts` at line 13, Move the native-artifact
receipt contract and parseNativeArtifactWorkloadReceiptV1 implementation out of
the onboard/workload/native-artifact module into a shared state-level module,
then update registry/types.ts and registry/workload.ts imports and callers to
use the new location. Preserve the existing persisted receipt shape and parser
behavior while removing their dependency on the transitional onboard module.

Source: Path instructions

🤖 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/onboard/runtime-provider/mxc.ts`:
- Line 27: Replace the local STARTUP_PROFILE_CONTRACT_VERSION declaration in the
runtime provider profile with the canonical
MANAGED_STARTUP_PROFILE_SCHEMA_VERSION import, confirming and using the existing
export path from native-artifact.ts. Update startupProfileContractVersions to
reference that imported constant so the declared support matches the parser’s
enforced contract.

In `@src/lib/onboard/sandbox-recreate-transaction.ts`:
- Line 111: Update the replacement matching logic around
workloadReference(replacement.workload) so native-artifact replacements ignore
imageTag and cannot be classified as "image-reused" solely from a stale tag when
workloadReference() returns null. Prefer enforcing imageTag: null during
registration or add an explicit native-artifact guard, and include a regression
test verifying the owned source workload is deleted.

---

Nitpick comments:
In `@src/lib/onboard/runtime-provider/contract.ts`:
- Around line 85-86: Make nativeArtifactSupport required but nullable in the
runtime provider contract, matching the support field and using null as the sole
absence representation. Update docker.ts and every runtime provider profile
literal to explicitly set nativeArtifactSupport: null when unsupported, and
adjust affected consumers to rely on the required nullable field.

In `@src/lib/onboard/runtime-provider/registry.ts`:
- Line 230: In the runtime-provider profile handling around the
nativeArtifactSupport check and the support === null early return, add a short
comment explaining that native-artifact validation must remain before the
null-support return because MXC_NATIVE_ARTIFACT_PROFILE uses support: null;
preserve the existing ordering and behavior.
- Around line 237-266: Extract the duplicated validation logic from the
native-artifact block and the managed-image block into one shared support-block
validator. Parameterize it with the support record, platform and agent
allowlists, version field names, and error-message prefix, then update both call
sites to use it while preserving the existing boolean, non-empty unique
allowlisted arrays, and positive safe-integer version checks.

In `@src/lib/state/registry/workload.ts`:
- Line 13: Move the native-artifact receipt contract and
parseNativeArtifactWorkloadReceiptV1 implementation out of the
onboard/workload/native-artifact module into a shared state-level module, then
update registry/types.ts and registry/workload.ts imports and callers to use the
new location. Preserve the existing persisted receipt shape and parser behavior
while removing their dependency on the transitional onboard module.
🪄 Autofix

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: 41e47d43-a40f-49d8-bee1-71e24ec26d67

📥 Commits

Reviewing files that changed from the base of the PR and between e7f58e9 and 413d076.

📒 Files selected for processing (11)
  • src/lib/onboard/runtime-provider/contract.ts
  • src/lib/onboard/runtime-provider/docker.ts
  • src/lib/onboard/runtime-provider/mxc.test.ts
  • src/lib/onboard/runtime-provider/mxc.ts
  • src/lib/onboard/runtime-provider/registry.ts
  • src/lib/onboard/sandbox-recreate-transaction.ts
  • src/lib/onboard/sandbox-workload-authority.test.ts
  • src/lib/state/registry/types.ts
  • src/lib/state/registry/workload.ts
  • test/helpers/runtime-provider-bundle.ts
  • test/runtime-provider-source-shape.test.ts

Comment thread src/lib/onboard/runtime-provider/mxc.ts Outdated
Comment thread src/lib/onboard/sandbox-recreate-transaction.ts
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / low confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: PR review advisor skipped: OpenShell inference configuration failed or the advisor credential is unavailable

Model lanes

  • GPT-5.6 Terra (primary): Skipped
  • Nemotron 3 Ultra (second opinion): Skipped

Second-opinion terminology and E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: onboard-repair, onboard-resume, cloud-onboard

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/onboard/sandbox-recreate-transaction.test.ts`:
- Around line 182-184: Update the replacement fixture in the test around
SOURCE_ENTRY so its native-artifact workload uses an existing valid receipt
fixture or includes all required artifact, launch, profile, and digest fields.
Remove the type cast, preserve the intentionally stale imageTag, and ensure the
test exercises the real native-artifact receipt contract.
🪄 Autofix

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: 0c9d04c4-5048-4e5a-a0c1-888f89aaceb4

📥 Commits

Reviewing files that changed from the base of the PR and between 413d076 and 80f5be0.

📒 Files selected for processing (4)
  • src/lib/onboard/runtime-provider/mxc.ts
  • src/lib/onboard/sandbox-recreate-transaction.test.ts
  • src/lib/onboard/sandbox-recreate-transaction.ts
  • src/lib/onboard/workload/native-artifact.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/lib/onboard/sandbox-recreate-transaction.ts
  • src/lib/onboard/runtime-provider/mxc.ts

Comment thread src/lib/onboard/sandbox-recreate-transaction.test.ts Outdated
@senthilr-nv
senthilr-nv requested review from apurvvkumaria and cv August 5, 2026 00:18
@senthilr-nv
senthilr-nv requested a review from prekshivyas August 5, 2026 01:09

@apurvvkumaria apurvvkumaria left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve — reviewed exact head d10c2ba against base 15b0c55. No blocking correctness, security, regression, or compatibility defect found. MXC remains absent from production selection; the native-artifact parser enforces the bounded identity, digest, path, environment-name, and startup-profile contracts; Docker rejects this receipt kind; and every unqualified lifecycle or mutation surface fails closed. The stale imageTag replacement case is covered without weakening source-workload authority. Focused review verification passed 64/64 tests. Security checklist: PASS across secrets, input validation, authorization, dependencies, logging, cryptography, configuration, tests, and holistic posture. Current required CI failures are in unchanged npm-link-or-shim, shields, and tunnel-service tests (including a timeout), so they do not demonstrate a regression from this patch; required checks should still be green before merge.

@senthilr-nv
senthilr-nv enabled auto-merge (squash) August 5, 2026 03:22
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
@senthilr-nv
senthilr-nv disabled auto-merge August 5, 2026 04:13
@senthilr-nv
senthilr-nv enabled auto-merge (squash) August 5, 2026 04:13
@senthilr-nv
senthilr-nv merged commit fdd6828 into main Aug 5, 2026
73 of 75 checks passed
@senthilr-nv
senthilr-nv deleted the codex/windows-mxc-inactive-provider branch August 5, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow integration: openclaw OpenClaw integration behavior platform: windows Affects native Windows environments v0.0.103 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants