Move contract-mapped v1 SDK types into V1 namespaces - #1355
Merged
Merged
Conversation
Gudge (MGudgin)
force-pushed
the
user/gudge/sdk-v1-namespaces
branch
2 times, most recently
from
September 30, 2026 20:31
1172f97 to
463a33c
Compare
Gudge (MGudgin)
added this pull request to stack #1356
September 30, 2026 21:26
Gudge (MGudgin)
force-pushed
the
user/gudge/sdk-v1-namespaces
branch
2 times, most recently
from
October 1, 2026 18:58
8978cff to
ab229c2
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Source-breaking API moves across three SDKs need human compatibility and packaging sign-off, and the CI validation regression remains unresolved.
Review effort: Balanced
Findings: None
What changed in this PR
Moves contract-mapped SDK APIs into explicit V1 namespaces, allowing future major versions to coexist while keeping version-independent APIs at package roots.
Changes:
- Introduces V1 entry points across .NET, Rust, and Node.
- Separates .NET platform discovery into
MxcPlatformand adds Node subpath exports. - Updates consumers, tests, documentation, and examples.
| File | Description |
|---|---|
| tests/playground/src/main/main.ts | Loads policy APIs from the V1 subpath. |
| src/ffi/mxc_ffi/src/streaming.rs | Updates streaming imports and documentation. |
| src/ffi/mxc_ffi/src/request.rs | Uses V1 request and policy types. |
| src/ffi/mxc_ffi/src/lib.rs | Imports V1 execution APIs. |
| src/core/mxc-sdk/tests/streaming.rs | Updates streaming tests to V1 imports. |
| src/core/mxc-sdk/tests/streaming_processcontainer.rs | Updates Windows streaming imports. |
| src/core/mxc-sdk/tests/streaming_bubblewrap.rs | Updates Linux streaming imports. |
| src/core/mxc-sdk/tests/state_aware.rs | Updates lifecycle imports and test naming. |
| src/core/mxc-sdk/tests/sdk_helpers.rs | Updates policy-helper imports. |
| src/core/mxc-sdk/tests/sandbox.rs | Uses V1 sandbox execution APIs. |
| src/core/mxc-sdk/tests/isolation_session.rs | Uses V1 IsolationSession APIs. |
| src/core/mxc-sdk/src/sandbox.rs | Adjusts internal imports and API links. |
| src/core/mxc-sdk/src/lib.rs | Introduces the Rust V1 API module. |
| src/core/mxc-sdk/README.md | Documents V1 Rust imports. |
| src/core/mxc_engine/src/policy.rs | Updates documentation and assertion wording. |
| sdk/node/tests/unit/state-aware-types.test.ts | Clarifies V1 test descriptions and comments. |
| sdk/node/tests/unit/inprocess-run.test.ts | Clarifies the V1 routing test description. |
| sdk/node/tests/integration/wslc-state-aware.test.ts | Imports lifecycle APIs from V1. |
| sdk/node/tests/integration/windows-process-container.test.ts | Imports policy types from V1. |
| sdk/node/tests/integration/test-helpers.ts | Combines root and V1 test helpers. |
| sdk/node/tests/integration/linux-process-container.test.ts | Imports policy types from V1. |
| sdk/node/tests/integration/isolation-session-state-aware.test.ts | Separates root errors from V1 lifecycle APIs. |
| sdk/node/src/v1.ts | Adds the Node V1 entry point. |
| sdk/node/src/index.ts | Separates root exports from V1 APIs. |
| sdk/node/README.md | Updates Node examples to V1 imports. |
| sdk/node/package.json | Adds V1 exports and type-resolution mapping. |
| sdk/dotnet/README.md | Documents V1 APIs and root platform discovery. |
| sdk/dotnet/Microsoft.Mxc.Sdk/V1/StateAwareTypes.cs | Moves lifecycle types into V1. |
| sdk/dotnet/Microsoft.Mxc.Sdk/V1/SandboxRequest.cs | Moves request types into V1. |
| sdk/dotnet/Microsoft.Mxc.Sdk/V1/SandboxPolicyDiscovery.cs | Moves policy discovery fragments into V1. |
| sdk/dotnet/Microsoft.Mxc.Sdk/V1/SandboxPolicy.cs | Moves policy types into V1. |
| sdk/dotnet/Microsoft.Mxc.Sdk/V1/SandboxId.cs | Moves sandbox identity into V1. |
| sdk/dotnet/Microsoft.Mxc.Sdk/V1/SandboxAdapters.cs | Moves typed adapters and delegates platform discovery. |
| sdk/dotnet/Microsoft.Mxc.Sdk/V1/MxcSandbox.cs | Moves execution APIs and extracts platform discovery. |
| sdk/dotnet/Microsoft.Mxc.Sdk/V1/MxcLifecycle.cs | Moves lifecycle APIs into V1. |
| sdk/dotnet/Microsoft.Mxc.Sdk/MxcPlatform.cs | Adds root native-version and discovery APIs. |
| sdk/dotnet/Microsoft.Mxc.Sdk.Tests/V1/SandboxPolicyTests.cs | Relocates policy tests and updates discovery calls. |
| sdk/dotnet/Microsoft.Mxc.Sdk.Tests/V1/SandboxPolicyDiscoveryTests.cs | Relocates policy discovery tests. |
| sdk/dotnet/Microsoft.Mxc.Sdk.Tests/V1/SandboxAdapterTests.cs | Relocates typed adapter tests. |
| sdk/dotnet/Microsoft.Mxc.Sdk.Tests/V1/MxcSandboxTests.cs | Relocates execution tests and updates platform calls. |
| sdk/dotnet/Microsoft.Mxc.Sdk.Tests/V1/MxcSandboxIsolationSessionE2ETests.cs | Relocates one-shot IsolationSession tests. |
| sdk/dotnet/Microsoft.Mxc.Sdk.Tests/V1/MxcLifecycleTests.cs | Relocates lifecycle tests. |
| sdk/dotnet/Microsoft.Mxc.Sdk.Tests/V1/MxcLifecycleE2ETests.cs | Relocates lifecycle end-to-end tests. |
| sdk/dotnet/Microsoft.Mxc.Sdk.Tests/V1/MxcLifecycleContractTests.cs | Relocates and renames lifecycle contract tests. |
| sdk/dotnet/Microsoft.Mxc.Sdk.Tests/MxcTelemetryTests.cs | Adds V1 imports for test requests. |
| sdk/dotnet/Microsoft.Mxc.Sdk.Tests/MxcSandboxProcessTests.cs | Adds V1 imports for process tests. |
| sdk/dotnet/Microsoft.Mxc.Sdk.Tests/MxcExceptionTests.cs | Adds V1 imports for exception tests. |
| sdk/dotnet/Microsoft.Mxc.Sdk.Tests/IsolationSessionHost.cs | Uses root platform discovery. |
| sdk/dotnet/Microsoft.Mxc.Sdk.Sample/Program.cs | Uses V1 execution and root native-version APIs. |
| sdk/dotnet/Microsoft.Mxc.Sdk.ConsoleDriver/Program.cs | Imports V1 APIs. |
| scripts/check-dotnet-api-parity.js | Tracks relocated types and platform discovery. |
| README.md | Updates Node quick-start imports. |
| docs/wsl/wslc-state-aware.md | Clarifies the V1 contract target. |
| docs/wsl/wsl-container-getting-started.md | Updates Node and Rust imports. |
| docs/versioning.md | Defines per-major SDK namespaces. |
| docs/state-aware-lifecycle/mxc-state-aware-sandbox-api.md | Updates lifecycle exports and guidance. |
| docs/state-aware-lifecycle/mxc-state-aware-sandbox-api-overview.md | Updates lifecycle namespace references. |
| docs/seatbelt/seatbelt-backend.md | Updates the Node example import. |
| docs/nanvix-microvm/nanvix-integration-plan.md | Uses raw experimental configuration in the example. |
| docs/lxc-support/lxc-backend.md | Separates raw execution and V1 policy imports. |
| docs/isolation-session/state-aware-typescript.md | Updates V1 imports and contract guidance. |
| docs/isolation-session/state-aware-rust.md | Updates Rust execution API references. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Gudge (MGudgin)
force-pushed
the
user/gudge/sdk-v1-namespaces
branch
from
October 2, 2026 04:28
ab229c2 to
a886b1b
Compare
This PR places contract-mapped authoring and typed execution APIs in Microsoft.Mxc.Sdk.V1, mxc_sdk::v1, and @microsoft/mxc-sdk/v1. These surfaces evolve additively across published 1.x contracts while a future V2 can live alongside them. Version-independent APIs stay at each package root. Details * Move .NET policy, request, lifecycle, and adapter APIs and their tests into V1 folders. Keep discovery on root MxcPlatform and fix XML references. * Group Rust typed lifecycle APIs under v1::container and request-aware probing under v1::probe; keep facts, handles, output, and raw JSON at root. * Export Node policy and lifecycle APIs from /v1, with root raw-config and runtime APIs, CommonJS-compatible exports, and node10 type resolution. * Add cross-language namespace guards, update consumers and examples, and fix platform-specific SDK test imports and macOS lint. Tests * cargo fmt --all -- --check passed. Workspace check and lint passed: cargo check --workspace --all-targets --all-features cargo clippy --workspace --all-targets --all-features -- -D warnings * cargo test -p mxc-sdk -p mxc_engine -p mxc_ffi: 283 passed, 8 ignored. Rustdoc, Linux all-target checks, and macOS clippy passed with warnings denied. Native Linux/macOS and elevated host suites were not run. * npm run build, npm run typecheck, and npm test passed (389 passed, 20 skipped); installed ESM/CommonJS and node10/NodeNext consumers passed. * Full .NET tests passed (299 passed, 27 live-host skips). XML documentation, C# API parity, generated bindings, and git diff --check passed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 30c4f940-9c8e-4d3e-89ff-b1776045bb1c Generated-with: gpt-6.1-sol
Gudge (MGudgin)
force-pushed
the
user/gudge/sdk-v1-namespaces
branch
from
October 2, 2026 04:51
a886b1b to
0df868a
Compare
Branden Bonaby (bbonaby)
approved these changes
Oct 2, 2026
2 tasks done
Branden Bonaby (bbonaby)
pushed a commit
that referenced
this pull request
Oct 2, 2026
…pace (#1371) Select the isolation-session C# test classes in any namespace The scheduled isolation-session jobs selected the C# end-to-end classes by fully qualified name. #1355 moved both into Microsoft.Mxc.Sdk.Tests.V1, so the filters matched nothing and the C# suite executed no tests. The filters now match the class names in any namespace, and the suite fails when either class executes no tests. Co-authored-by: adpa-ms <> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 74255d4c-9d4f-4f2f-a9cc-e6d3ecd37780
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.
This PR places the SDK types that map to the exact contract in an explicit
major-version namespace in each SDK:
Microsoft.Mxc.Sdk.V1,mxc_sdk::v1,and
@microsoft/mxc-sdk/v1. These types evolve additively as 1.x contractsare published, and a future v2 can add a V2 namespace alongside them.
Version-independent APIs stay at each package root.
Details
MxcSandbox, andtyped adapter types move to
Microsoft.Mxc.Sdk.V1in aV1\sourcefolder. The new root
MxcPlatformholdsNativeVersion,GetAvailableBackends, andGetPlatformSupport. V1-subject tests move toMicrosoft.Mxc.Sdk.Tests.V1.mxc_sdk::v1holds the policy, config, request, containment, andtyped lifecycle items plus
runandspawn_sandbox; the root keepserrors, discovery, telemetry, process handles, and raw exact-JSON entry
points.
@microsoft/mxc-sdk/v1subpath holds policy, policy helpers,one-shot convenience, and typed lifecycle APIs; the root keeps raw config,
discovery, errors, telemetry, and running-process surfaces. Both exports
carry
types,import, anddefaultconditions so CommonJSrequire()works on Node 24, and
typesVersionsmapsv1fornode10resolution.docs/versioning.mddocuments the per-major namespace convention, anddocs and examples import V1 APIs from the V1 paths.
Tests
cargo fmt,check, andclippyfor the workspace;cargo testformxc-sdk,mxc_engine, andmxc_ffi;cargo docwithRUSTDOCFLAGS=-D warnings.and
require()/import()of both entry points on Node 24.18.dotnet test --solution Microsoft.Mxc.Sdk.slnx(244 passed,27 skipped).
type-check;
git diff --check.Microsoft Reviewers: Open in CodeFlow