Skip to content

Replace NanVix implementation behind the MicroVM backend with NVX - #1223

Open
Huzaifa Danish (huzaifa-d) wants to merge 44 commits into
mainfrom
user/modanish/shiny-telegram
Open

Huzaifa Danish (huzaifa-d) wants to merge 44 commits into
mainfrom
user/modanish/shiny-telegram

Conversation

@huzaifa-d

@huzaifa-d Huzaifa Danish (huzaifa-d) commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Replace the experimental NanVix implementation behind MXC's existing microvm backend with the Phase One NVX foundation while preserving microvm as the single public backend identity.

  • keeps containment: "microvm" across the development contracts, Rust model, and Node SDK;
  • keeps the public microvm Cargo feature and build.bat --with-microvm switch;
  • removes the NanVix runtime crates, Linux implementation, artifact staging, tests, workflows, playground scenarios, and active documentation;
  • routes MicroVM dispatch and artifact preflight through the internal NVX crates;
  • stages the pinned NVX OpenVMM, kernel, and initramfs artifacts for Windows x64;
  • remains typed-unavailable after NVX preflight until the remaining runtime and policy work is implemented;
  • does not expose nvx as a second public containment alias.

Published v0.9 schema artifacts remain unchanged. The MicroVM/NVX contract changes are limited to the v0.10 development line.

huzaifa-msft and others added 23 commits September 8, 2026 14:29
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: GitHub Copilot <github-copilot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Copilot <github-copilot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Copilot <github-copilot[bot]@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use Cargo target metadata for artifact staging, keep engine-only NVX builds portable, and align the documented working-directory contract.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 21, 2026 19:43
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Copilot-Instructions PR modifies Copilot instruction files (.github/copilot-instructions.md or .github/instructions/) label Sep 21, 2026

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

State-aware legacy requests do not receive the promised NVX migration guidance, and exact-adapter NVX coverage is incomplete.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)
What changed in this PR

Replaces the retired NanVix microvm backend with the Windows x64 NVX foundation while keeping execution unavailable pending runtime assets.

Changes:

  • Adds NVX contracts, SDK identity, typed dispatch errors, artifact acquisition, and staging.
  • Removes NanVix runtime code, tests, CI wiring, and documentation.
  • Updates schemas, generated types, build paths, and backend documentation.

Two issues remain: state-aware microvm requests miss migration guidance, and the exact-contract NVX adapter lacks parity-test coverage.

File Description
tests/​scripts/​run_microvm_tests.ps1 Removes MicroVM E2E suite
tests/​scripts/​run_microvm_basic_test.ps1 Removes MicroVM smoke test
tests/​scripts/​README.md Removes MicroVM test documentation
tests/​playground/​src/​renderer/​index.html Removes MicroVM UI option
tests/​playground/​src/​main/​main.ts Removes NanVix launch handling
tests/​playground/​package.json Removes packaged NanVix assets
tests/​configs/​microvm_timeout.json Removes Windows timeout fixture
tests/​configs/​microvm_timeout_linux.json Removes Linux timeout fixture
tests/​configs/​microvm_stdlib.json Removes Windows stdlib fixture
tests/​configs/​microvm_stdlib_linux.json Removes Linux stdlib fixture
tests/​configs/​microvm_network.json Removes Windows network fixture
tests/​configs/​microvm_network_linux.json Removes Linux network fixture
tests/​configs/​microvm_multiline.json Removes Windows multiline fixture
tests/​configs/​microvm_multiline_linux.json Removes Linux multiline fixture
tests/​configs/​microvm_large_output.json Removes Windows output fixture
tests/​configs/​microvm_large_output_linux.json Removes Linux output fixture
tests/​configs/​microvm_hello.json Removes Windows hello fixture
tests/​configs/​microvm_hello_linux.json Removes Linux hello fixture
tests/​configs/​microvm_exit_code.json Removes Windows exit fixture
tests/​configs/​microvm_exit_code_linux.json Removes Linux exit fixture
tests/​configs/​microvm_error.json Removes Windows error fixture
tests/​configs/​microvm_error_linux.json Removes Linux error fixture
src/​testing/​wxc_e2e_tests/​tests/​e2e_linux_microvm.rs Removes Linux MicroVM E2E tests
src/​testing/​wxc_e2e_tests/​src/​lib.rs Removes NanVix prerequisite helpers
src/​testing/​fuzz/​fuzz_targets/​validator.rs Removes NanVix validation dispatch
src/​testing/​fuzz/​corpus/​base64_decode/​microvm_hello.b64.txt Removes MicroVM fuzz seed
src/​testing/​fuzz/​Cargo.toml Removes NanVix fuzz feature
src/​core/​wxc/​src/​main.rs Adds NVX CLI quoting coverage
src/​core/​wxc/​Cargo.toml Adds NVX executor feature
src/​core/​wxc/​build.rs Stages NVX target artifacts
src/​core/​wxc_common/​src/​wire.rs Replaces wire identity with NVX
src/​core/​wxc_common/​src/​models.rs Adds NVX domain variant
src/​core/​wxc_common/​src/​lib.rs Removes MicroVM staging module
src/​core/​wxc_common/​src/​config_parser.rs Parses NVX and rejects MicroVM
src/​core/​wxc_common/​src/​config_contract_adapters/​dev/​one_shot.rs Maps exact NVX contract
src/​core/​wxc_common/​src/​config_contract_adapters/​dev/​one_shot_tests/​experimental.rs Removes MicroVM adapter case
src/​core/​wxc_common/​src/​cmdline.rs Uses POSIX quoting for NVX
src/​core/​wxc_common/​Cargo.toml Removes NanVix dependencies
src/​core/​mxc-sdk/​README.md Documents NVX executor-only access
src/​core/​mxc-sdk/​Cargo.toml Exposes NVX engine feature
src/​core/​mxc_engine/​src/​run.rs Adds typed NVX unavailable dispatch
src/​core/​mxc_engine/​src/​probe.rs Keeps NVX unadvertised
src/​core/​mxc_engine/​src/​platform.rs Omits incomplete NVX support
src/​core/​mxc_engine/​src/​dispatch.rs Updates streaming documentation
src/​core/​mxc_engine/​Cargo.toml Replaces NanVix runner dependency
src/​core/​mxc_config_contract/​tests/​version_boundaries/​containment.rs Tests NVX version boundary
src/​core/​mxc_config_contract/​tests/​v0_9_0_alpha/​enums.rs Tests exact NVX enum
src/​core/​mxc_config_contract/​src/​dev/​one_shot.rs Defines NVX containment contract
src/​core/​lxc/​src/​main.rs Removes Linux MicroVM reference
src/​core/​lxc/​Cargo.toml Removes Linux NanVix feature
src/​core/​lxc/​build.rs Removes NanVix artifact staging
src/​Cargo.toml Registers NVX workspace crates
src/​Cargo.lock Replaces NanVix package entries
src/​backends/​nvx/​runner/​src/​lib.rs Adds typed NVX preflight
src/​backends/​nvx/​runner/​Cargo.toml Defines NVX runner crate
src/​backends/​nvx/​common/​src/​lib.rs Defines artifact and release model
src/​backends/​nvx/​common/​Cargo.toml Defines NVX common crate
src/​backends/​nvx/​build_common/​src/​lib.rs Implements target-aware staging
src/​backends/​nvx/​build_common/​Cargo.toml Defines staging helper crate
src/​backends/​nvx/​binaries/​versions.json Pins NVX development release
src/​backends/​nvx/​binaries/​src/​lib.rs Exposes artifact metadata
src/​backends/​nvx/​binaries/​checksums.json Pins per-file checksums
src/​backends/​nvx/​binaries/​Cargo.toml Defines acquisition crate
src/​backends/​nvx/​binaries/​build.rs Downloads and verifies artifacts
src/​backends/​nanvix/​runner/​Cargo.toml Removes NanVix runner crate
src/​backends/​nanvix/​common/​src/​lib.rs Removes NanVix shared implementation
src/​backends/​nanvix/​build_common/​Cargo.toml Removes NanVix staging crate
src/​backends/​nanvix/​binaries/​versions.json Removes NanVix release pin
src/​backends/​nanvix/​binaries/​src/​lib.rs Removes NanVix metadata
src/​backends/​nanvix/​binaries/​checksums.json Removes NanVix checksums
src/​backends/​nanvix/​binaries/​Cargo.toml Removes NanVix acquisition crate
src/​backends/​hyperlight/​common/​src/​lib.rs Updates feature example
sdk/​node/​tests/​unit/​sandbox.test.ts Tests NVX SDK exposure
sdk/​node/​src/​types.ts Exposes concrete NVX backend
sdk/​node/​src/​sandbox.ts Removes MicroVM policy builder
sdk/​node/​src/​helper.ts Validates NVX platform and migration
sdk/​node/​src/​generated/​wire.ts Regenerates rolling wire types
sdk/​node/​src/​generated/​v0_9_0_alpha/​wire.ts Regenerates exact wire types
sdk/​node/​README.md Documents NVX SDK behavior
scripts/​ci/​validation-test-matrix.json Removes MicroVM validation entries
scripts/​ci/​run_backend_validation_tests.sh Removes Linux MicroVM dispatch
scripts/​ci/​run_backend_validation_tests.ps1 Removes Windows MicroVM dispatch
scripts/​ci/​resolve-validation-test-matrix.mjs Removes MicroVM ARM64 rule
scripts/​ci/​print-perf-summary.ps1 Removes MicroVM performance helper
scripts/​ci/​prepare-windows-host.ps1 Removes NanVix host preparation
scripts/​ci/​prepare-linux-host.sh Removes Linux NanVix checks
schemas/​dev/​mxc-config.schema.0.9.0-dev.json Regenerates rolling NVX schema
schemas/​dev/​mxc-config.schema.0.9.0-alpha.json Regenerates exact NVX schema
README.md Documents NVX foundation
docs/​state-aware-lifecycle/​mxc-state-aware-sandbox-api.md Updates backend references
docs/​state-aware-lifecycle/​mxc-state-aware-sandbox-api-overview.md Updates containment overview
docs/​schema.md Documents NVX containment and cwd
docs/​sandbox-policy/​0.8.0/​networking/​networking.md Updates out-of-scope backend name
docs/​nanvix-microvm/​nanvix.md Removes NanVix backend guide
docs/​linux-wsl-roadmap-june-2026.md Replaces NanVix comparison
docs/​isolation-session/​oneshot.md Removes deleted test reference
docs/​ci-validation-infrastructure.md Removes MicroVM CI documentation
docs/​bwrap-support/​bubblewrap-backend-plan.md Updates containment examples
docs/​backend-support-probe-api-plan.md Updates future NVX probing
CONTRIBUTING.md Documents NVX build option
build.sh Removes Linux MicroVM option
build.bat Adds Windows x64 NVX option
.gitignore Removes MicroVM result ignore
.github/​workflows/​microvm-e2e.yml Removes MicroVM workflow
.github/​workflows/​issue-triage.md Updates NVX ownership keywords
.github/​workflows/​CodeQL.yml Updates backend comment
.github/​workflows/​Build.Windows.Job.yml Adds NVX packaging check
.azure-pipelines/​templates/​Rust.Build.Job.yml Removes shipped MicroVM feature
.azure-pipelines/​templates/​Fuzz.Build.Job.yml Removes MicroVM fuzz feature

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/core/wxc_common/src/config_parser.rs Outdated
Comment thread src/core/wxc_common/src/config_contract_adapters/dev/one_shot.rs Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 21, 2026 20:23
@huzaifa-d

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

The Node API introduces a source-breaking containment change, and the NVX feature chain does not activate artifact acquisition consistently.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)

Comment thread sdk/node/src/types.ts Outdated
Comment thread src/backends/nvx/runner/Cargo.toml Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 22, 2026 18:42
@huzaifa-d

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

SDK-authored MicroVM payloads include unsupported UI policy, and two public API documents contradict the preserved microvm intent.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 2 Low severity

Open (2)
Resolved since last review (2)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Reject or omit unsupported UI policy for MicroVM payloads

sdk/​node/​src/​sandbox.ts:519

This branch now returns the shared config.ui block synthesized above even when the caller did not specify UI policy. The NVX compatibility document says ui must be rejected for this backend, so every SDK-authored MicroVM payload currently contains policy the backend cannot honor; the old dedicated MicroVM path returned before UI was added. Reject an explicitly supplied policy.ui, omit the synthesized default block, and assert payload.ui is absent in the regression test.

Comment thread docs/state-aware-lifecycle/mxc-state-aware-sandbox-api-overview.md Outdated
Comment thread sdk/node/README.md Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 22, 2026 18:55
@huzaifa-d

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

The cross-cutting build, artifact-supply-chain, runtime-dispatch, SDK, and documentation migration warrants final human review, with one canonical documentation inconsistency still unresolved.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
Resolved since last review (2)

Comment thread docs/schema.md
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 22, 2026 19:07
@huzaifa-d

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

The new mxc-sdk/microvm feature downloads NVX artifacts but has no public SDK path that can select or dispatch MicroVM.

Review effort: Balanced
Findings: None

Resolved since last review (1)
Previously missed (1)

In code that hasn't changed since last review

Medium severity MicroVM SDK feature is enabled but unreachable through public APIs

src/​core/​mxc-sdk/​Cargo.toml:20

This feature is not reachable through any mxc-sdk API: the SDK's public Containment enum deliberately has no MicroVM variant, its one-shot APIs use the streaming dispatcher (which rejects MicroVM), the state-aware contract does not register it, and both capability APIs intentionally omit it. Enabling mxc-sdk/microvm therefore only triggers the NVX artifact download/verification without allowing callers to reach the typed-unavailable path. Either remove this SDK feature until an SDK execution surface exists, or add the corresponding public selection/dispatch path and document it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 22, 2026 20:54
@huzaifa-d

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

The broad backend replacement includes supply-chain acquisition, cross-target packaging, dispatch, SDK, and CI changes that warrant final human validation.

Review effort: Balanced
Findings: None

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.

LGTM

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Copilot-Instructions PR modifies Copilot instruction files (.github/copilot-instructions.md or .github/instructions/)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants