Repository navigation
NVX Phase 3: Streaming and Container Lifecycle - #1539
Draft
Huzaifa Danish (huzaifa-d) wants to merge 18 commits into
Draft
Huzaifa Danish (huzaifa-d) wants to merge 18 commits into
Huzaifa Danish (huzaifa-d) wants to merge 18 commits into
Conversation
Add the minimal signed create-and-run NVX0430 bundle. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: aee99423-dfee-4d61-86e9-421b944c4cc0
Preserve executor output bytes and propagate test failures. Correct timeout assertions and simplify review wording and documentation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Link the root README to the SDK integration notes and document host prerequisites and policy restrictions there. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore the Nanvix guide unchanged from the PR base and keep the README and CI notes focused on the current integration. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Harden bundled deployment, map supported policy through NVX capabilities, and keep streaming and persistent lifecycle outside this layer. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Strengthen host-only image and experimental authorization tests without changing production behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve captured execution, required caller-selected images, experimental gates, and private lifecycle state. Repair read-only discovery, streaming admission/cleanup, stream closers, timeout teardown diagnostics, refused-cancellation Drop and relayed timeout semantics with production-path regression coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove stale captured-only restrictions and the misleading legacy guide link; keep policy test diagnostics independent of implementation phases. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reject linked source ancestors before bundle verification or staging, with actual symlink and junction regressions. Exercise typed nonempty network rule mapping and fail-closed egress rule capabilities. Remove redundant captured engine request borrows. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Cache native terminal outcomes and errors, perform poll-triggered teardown on an owned background worker, and retain cleanup ownership across thread creation failures. Add real blocked-teardown and repeated-poll regressions; fix and parse-check lifecycle image payloads without executing VMs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Carry exact Phase2 bundle source-ancestor checks, network policy regression tests and engine borrow fixes. Adapt policy test calls to Phase3 provision config and remove the sole redundant SDDL revision cast for warning-clean SDK and executor builds. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve provision-time policy ownership, proxy error precedence and omitted-network behavior. Cover production parser/binding and public lifecycle entry points with absent-bundle and side-effect controls. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Report phase, native exit code, stdout and stderr without changing lifecycle cleanup flow. Capture native streams at process boundary for Windows PowerShell 5.1 and cover failures and success with a host-only fake executor. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Allocate both capture files inside their cleanup scope and explicitly dispose the completed executor process handle. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Rethrow original errors after successful cleanup and aggregate primary and deprovision diagnostics when both fail, including invocation exceptions. Extend real PowerShell host coverage for combined failures without VM execution. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
3 of 8 tasks
Check slash-separated guest path segments alongside the existing host path component guard. Cover UNC-like Windows parsing, unchanged safe-path forwarding, and exact pre-discovery JSON errors. 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>
Huzaifa Danish (huzaifa-d)
requested review from
a team
and
a balanced review from Copilot
October 21, 2026 19:25
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Failure-path VM cleanup, incomplete-bundle discovery, and proxy-test timing need correction.
3 open issues
What changed in this PR
Extends Phase 2 NVX support with experimental streaming execution and persistent container lifecycle operations on Windows x64.
Changes:
- Adds Rust experimental APIs, engine routing, and NVX process handling.
- Extends development contracts with provisioning and optional memory configuration.
- Adds discovery, private lifecycle storage, tests, and documentation.
| File | Description |
|---|---|
| tests/scripts/run_microvm_state_aware_tests.ps1 | Adds executor lifecycle coverage. |
| tests/scripts/README.md | Lists the lifecycle test script. |
| src/mxc-sdk/tests/nvx_phase3_e2e.rs | Covers streaming, lifecycle, and policy behavior. |
| src/mxc-sdk/tests/nvx_e2e.rs | Extends validation and capability coverage. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/request.rs | Tests image and provision requirements. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/one_shot/valid/microvm-memory.json | Adds explicit-memory fixture. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/one_shot/valid/microvm-empty-provision.json | Covers empty provision settings. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/one_shot/invalid/microvm-string-memory.json | Rejects string memory values. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/one_shot/invalid/microvm-null-provision.json | Rejects null provision settings. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/one_shot/invalid/microvm-null-memory.json | Rejects null memory values. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/one_shot/invalid/microvm-negative-memory.json | Rejects negative memory values. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/one_shot/invalid/microvm-memory-without-image.json | Requires an image with memory settings. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/microvm_provision/valid/full-policy.json | Adds provisioning policy fixture. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/microvm_provision/invalid/unknown-field.json | Rejects unknown provision fields. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/microvm_provision/invalid/missing-image.json | Rejects provisioning without an image. |
| src/mxc-sdk/src/state_aware_sdk.rs | Adds typed MicroVM provisioning. |
| src/mxc-sdk/src/policy/exact/mod.rs | Tests memory normalization. |
| src/mxc-sdk/src/policy/exact/dev_microvm.rs | Maps typed memory settings. |
| src/mxc-sdk/src/policy.rs | Adds optional MicroVM memory selection. |
| src/mxc-sdk/src/lib.rs | Exposes experimental streaming and lifecycle APIs. |
| src/mxc-sdk/src/core/mxc_engine/state_aware.rs | Routes MicroVM lifecycle operations. |
| src/mxc-sdk/src/core/mxc_engine/probe.rs | Includes MicroVM in discovery. |
| src/mxc-sdk/src/core/mxc_engine/dispatch.rs | Routes authorized streaming requests. |
| src/mxc-sdk/src/core/mxc_engine/backend_registry.rs | Registers Windows probe coverage. |
| src/mxc-sdk/src/core/mxc_contract/registry.rs | Registers the provision request root. |
| src/mxc-sdk/src/core/mxc_contract/dev/state_aware/provision/mod.rs | Exports MicroVM provision types. |
| src/mxc-sdk/src/core/mxc_contract/dev/state_aware/provision/microvm.rs | Defines the provision contract. |
| src/mxc-sdk/src/core/mxc_contract/dev/state_aware/provision/containment.rs | Recognizes MicroVM provisioning. |
| src/mxc-sdk/src/core/mxc_contract/dev/state_aware/mod.rs | Exports lifecycle contract types. |
| src/mxc-sdk/src/core/mxc_contract/dev/schema.rs | Generates the new provision schema branch. |
| src/mxc-sdk/src/core/mxc_contract/dev/request.rs | Parses MicroVM provision requests. |
| src/mxc-sdk/src/core/mxc_contract/dev/one_shot.rs | Adds creation-time provision settings. |
| src/mxc-sdk/src/core/mxc_contract/dev/mod.rs | Exports shared MicroVM types. |
| src/mxc-sdk/src/core/mxc_contract/dev/microvm.rs | Defines optional memory settings. |
| src/mxc-sdk/src/core/mxc_common/state_aware_operation.rs | Models and validates MicroVM provisioning. |
| src/mxc-sdk/src/core/mxc_common/state_aware_input.rs | Rejects misplaced creation settings. |
| src/mxc-sdk/src/core/mxc_common/state_aware_dispatch.rs | Resolves MicroVM container IDs. |
| src/mxc-sdk/src/core/mxc_common/state_aware_binding.rs | Binds operations and rejects exec-time networking. |
| src/mxc-sdk/src/core/mxc_common/state_aware_binding_tests.rs | Tests binding restrictions. |
| src/mxc-sdk/src/core/mxc_common/sdk_input.rs | Initializes optional memory state. |
| src/mxc-sdk/src/core/mxc_common/policy_identity.rs | Includes memory in policy identity. |
| src/mxc-sdk/src/core/mxc_common/models.rs | Adds runtime provisioning configuration. |
| src/mxc-sdk/src/core/mxc_common/filesystem_dacl.rs | Creates and validates private directories. |
| src/mxc-sdk/src/core/mxc_common/config_parser.rs | Normalizes MicroVM lifecycle and memory input. |
| src/mxc-sdk/src/core/mxc_common/config_deserialize.rs | Checks the new contract root. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/v1_0/state_aware.rs | Leaves MicroVM memory absent. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/v1_0/one_shot.rs | Preserves existing contract behavior. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/v0_9/state_aware.rs | Leaves MicroVM memory absent. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/v0_9/one_shot.rs | Preserves existing contract behavior. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/dev/state_aware.rs | Adapts MicroVM provision requests. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/dev/state_aware_tests/common.rs | Checks creation-field isolation. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/dev/one_shot.rs | Extracts creation memory settings. |
| src/mxc-sdk/src/core/mxc_common/common_request_ir.rs | Carries optional memory configuration. |
| src/mxc-sdk/src/backends/nvx/test_support.rs | Adds backend fixtures and failure controls. |
| src/mxc-sdk/src/backends/nvx/state_aware.rs | Implements NVX lifecycle operations. |
| src/mxc-sdk/src/backends/nvx/runtime.rs | Admits private persistent lifecycle storage. |
| src/mxc-sdk/src/backends/nvx/process.rs | Adapts streams, cancellation, and outcomes. |
| src/mxc-sdk/src/backends/nvx/policy.rs | Maps memory and streaming capabilities. |
| src/mxc-sdk/src/backends/nvx/mod.rs | Adds bundle and hypervisor discovery. |
| src/mxc-sdk/README.md | Documents experimental execution support. |
| sdk/node/src/generated/v1_1_0_alpha/wire.ts | Updates generated development types. |
| schemas/dev/mxc-config.schema.1.1.0-alpha.json | Updates the generated development schema. |
| README.md | Announces streaming and lifecycle support. |
| docs/schema.md | Documents provisioning and policy restrictions. |
| docs/development/guides/authoring-a-new-feature.md | Explains experimental contract integration. |
| docs/api-reference/rust/v1/types.md | Documents new configuration types. |
| docs/api-reference/rust/v1/README.md | Clarifies experimental API authorization. |
| docs/api-reference/rust/v1/api.md | Documents experimental operation signatures. |
| .github/workflows/microvm-e2e.yml | Runs the new lifecycle suites. |
Review effort: Balanced
|
|
||
| pub(crate) fn is_available() -> bool { | ||
| // Asset discovery must not open a host or admit persistent lifecycle state. | ||
| aci_edge_sandboxes::agent::BundledAgent::discover().is_ok() && hypervisor_available() |
| listener.set_nonblocking(true).unwrap(); | ||
| let port = listener.local_addr().unwrap().port(); | ||
| let proxy = std::thread::spawn(move || { | ||
| let deadline = Instant::now() + Duration::from_secs(30); |
Comment on lines
+109
to
+111
| $deprovision = Invoke-MicroVmPhase -Phase "deprovision" -SandboxId $sandboxId -Payload @{ | ||
| version = "1.1.0-alpha" | ||
| } |
This was referenced Oct 26, 2026
3 tasks
2 of 11 tasks
4 of 11 tasks
Huzaifa Danish (huzaifa-d)
marked this pull request as draft
October 29, 2026 23:07
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

📖 Description
Builds on Phase 2 (#1538) to add experimental NVX streaming execution and persistent container lifecycle operations on Windows x64.
🔗 References
Fixes #1586.
✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see pull request builds)📋 Issue Type
GitHub Actions runs the PR validation build automatically. The ADO pipeline
(
MXC-PR-Build) is the Azure version of the PR pipeline, kept in parity with the GitHubActions build; it runs on merge to
main, and Microsoft reviewers with write access can trigger iton a PR with
/azp run. See pull request builds.If the
dependency-feed-checkcheck fails on a new dependency, the crate must be added tothe feed before the PR can pass. See pull request builds
for the steps.
Microsoft Reviewers: Open in CodeFlow