Move the SDK authoring types into mxc-sdk - #1353
Open
Gudge (MGudgin) wants to merge 1 commit into
Open
Gudge (MGudgin) wants to merge 1 commit into
Gudge (MGudgin) wants to merge 1 commit into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Gudge (MGudgin)
force-pushed
the
user/gudge/move-sdk-policy-types
branch
from
September 30, 2026 17:18
91b389c to
efc776c
Compare
Gudge (MGudgin)
force-pushed
the
user/gudge/move-sdk-policy-types
branch
from
September 30, 2026 17:27
efc776c to
e44c918
Compare
Gudge (MGudgin)
force-pushed
the
user/gudge/move-sdk-policy-types
branch
from
September 30, 2026 17:32
e44c918 to
c0f2a80
Compare
Gudge (MGudgin)
pushed a commit
that referenced
this pull request
Sep 30, 2026
This PR adds a handoff for the v1 SDK and JSON-only FFI ingress stack and updates the ingress plan to match what was built. It records the pull requests, branches, worktrees, and backups, the design decisions and their reasons, review status, open items, and working notes for a new session. Details * Add docs/version-aware-stack-session-handoff-2026-09-30.md covering #1271, #1348, and #1349-#1353, the backend-based experimental opt-in, JSON-only ingress, V1 namespaces and MxcPlatform, the pinned SDK target, Node export conditions, shared goldens, and E0. * Mark the plan adopted, replace the planned branch table with the opened pull requests, record the unified experimental check, the serde removal, the V1 writer location, and E0, and add the namespace, goldens, and E0 decisions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 33217f7b-dc7d-4da0-af5f-018fef64013c Generated-with: claude-opus-5.5
Gudge (MGudgin)
force-pushed
the
user/gudge/move-sdk-policy-types
branch
from
September 30, 2026 20:29
c0f2a80 to
ec05b94
Compare
Gudge (MGudgin)
force-pushed
the
user/gudge/move-sdk-policy-types
branch
from
September 30, 2026 20:31
ec05b94 to
fae3cba
Compare
Gudge (MGudgin)
added this pull request to stack #1356
September 30, 2026 21:26
Gudge (MGudgin)
marked this pull request as ready for review
September 30, 2026 21:27
Gudge (MGudgin)
force-pushed
the
user/gudge/move-sdk-policy-types
branch
from
September 30, 2026 21:30
fae3cba to
3ac7782
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new engine metadata type is compiled out while still referenced unconditionally on Linux and macOS.
Review effort: Balanced
Findings: 1
What changed in this PR
Moves Rust v1 authoring and lifecycle types from mxc_engine into the public mxc-sdk facade while retaining execution and backend dispatch in the engine.
Changes:
- Relocates policy, backend configuration, lifecycle models, and golden tests into
mxc-sdk. - Changes engine APIs to consume normalized execution inputs.
- Updates dependencies and documentation for the new ownership boundary.
| File | Description |
|---|---|
tests/policy/README.md |
Updates golden-test paths and commands. |
src/mxc_telemetry/src/lib.rs |
Updates engine API references. |
src/core/wxc_common/src/telemetry/mod.rs |
Updates streaming API documentation. |
src/core/wxc_common/src/sdk_input.rs |
Documents SDK ownership. |
src/core/mxc-sdk/src/state_aware_sdk.rs |
Owns lifecycle models and engine result conversion. |
src/core/mxc-sdk/src/sandbox.rs |
Converts typed lifecycle requests before engine dispatch. |
src/core/mxc-sdk/src/policy/sdk_v1_goldens.rs |
Moves SDK golden validation. |
src/core/mxc-sdk/src/policy/network.rs |
Adds public network authoring types. |
src/core/mxc-sdk/src/policy/exact/v1_0.rs |
Builds exact v1 contracts. |
src/core/mxc-sdk/src/policy/exact/mod.rs |
Normalizes SDK policy requests. |
src/core/mxc-sdk/src/policy.rs |
Updates public request documentation. |
src/core/mxc-sdk/src/lib.rs |
Exposes the relocated v1 API. |
src/core/mxc-sdk/src/configs/seatbelt.rs |
Adds Seatbelt authoring configuration. |
src/core/mxc-sdk/src/configs/process_container.rs |
Adds ProcessContainer configuration and tests. |
src/core/mxc-sdk/src/configs/lxc.rs |
Adds LXC authoring configuration. |
src/core/mxc-sdk/src/configs.rs |
Re-exports backend configurations. |
src/core/mxc-sdk/Cargo.toml |
Adds contract and test dependencies. |
src/core/mxc_engine/src/state_aware.rs |
Replaces SDK models with normalized engine DTOs. |
src/core/mxc_engine/src/run.rs |
Uses normalized requests in attribution tests. |
src/core/mxc_engine/src/lib.rs |
Exposes normalized execution entry points. |
src/core/mxc_engine/src/error.rs |
Updates API documentation. |
src/core/mxc_engine/src/dispatch.rs |
Rewrites tests around normalized requests. |
src/core/mxc_engine/Cargo.toml |
Removes the runtime contract dependency. |
src/Cargo.lock |
Records dependency relocation. |
src/backends/bubblewrap/common/src/bwrap_runner.rs |
Updates engine API references. |
src/backends/bubblewrap/common/src/bwrap_command.rs |
Updates SDK builder references. |
docs/authoring-a-new-feature.md |
Points feature authors to the SDK builder. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+883
to
+887
| let config = if image.is_none() && image_tar_path.is_none() { | ||
| None | ||
| } else { | ||
| Some(wxc_common::models::WslcProvisionConfig { | ||
| image, |
| /// this gate the runner silently discards an explicitly-set, security-relevant | ||
| /// field. Every *public* entry point reaches the runner through the parser | ||
| /// today -- `mxc_engine::build_request*` maps a policy to wire JSON and runs | ||
| /// today -- `mxc_sdk::build_request*` maps a policy to wire JSON and runs |
This PR moves the Rust SDK's v1 policy, containment, request, and typed lifecycle authoring types into mxc-sdk. The engine now accepts a normalized ExecutionRequest from either the SDK builder or the exact JSON parser and keeps backend dispatch, host probing, telemetry, and execution in one place. Details * Move policy, exact v1 builder, SDK v1 goldens, backend config types, and typed lifecycle SDK models into mxc-sdk under the public mxc_sdk::v1 paths. * Replace mxc_engine::spawn(SandboxRequest) with mxc_engine::spawn_execution_request(&ExecutionRequest). * Keep root mxc_sdk raw JSON, discovery, telemetry, Sandbox, Output, and WaitOutcome APIs stable while v1::spawn_sandbox forwards request.inner to the engine. * Add direct mxc_config_contract and serde dependencies to mxc-sdk and remove non-test contract dependency from mxc_engine. * Rewrite engine tests to use ExecutionRequest or SdkStateAwareInput directly and move SDK-builder validation tests with the moved SDK code. Tests * Baseline Rust test inventory: mxc_engine 139, mxc-sdk 60, mxc_ffi 84; total 283. After move: mxc_engine 90, mxc-sdk 109, mxc_ffi 84; total 283. * cargo fmt --all -- --check; cargo check --workspace --all-targets --all-features; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo test -p mxc_engine --all-features; cargo test -p mxc-sdk --all-features; cargo test -p mxc_ffi --all-features; cargo test -p wxc --all-features; RUSTDOCFLAGS=-D warnings cargo doc -p mxc-sdk -p mxc_ffi --no-deps --all-features. * sdk/node: npm run build; npm test; npm run typecheck. * sdk/dotnet: dotnet test --solution Microsoft.Mxc.Sdk.slnx. * node scripts/check-dotnet-api-parity.js; node scripts/check-dotnet-bindings-codegen.js; node scripts/versioning/check-contract-codegen.js; node scripts/versioning/validate-configs.js; node scripts/versioning/check-tests-present.js. * git diff --check. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 33217f7b-dc7d-4da0-af5f-018fef64013c Generated-with: gpt-5.5
Gudge (MGudgin)
force-pushed
the
user/gudge/move-sdk-policy-types
branch
from
September 30, 2026 21:40
3ac7782 to
e246be7
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Contributor and package documentation currently reference a nonexistent builder path and contradict the new ownership model.
Review effort: Balanced
Findings: 1
Open (4)
Resolved since last review (1)
| | `src/core/wxc_common/src/config_contract_adapters/dev/` | Adapt the exact field into private `CommonRequestIR` | | ||
| | `src/core/wxc_common/src/wire.rs` | Add only reusable nested normalization DTOs needed by the adapter; never add a whole-request root | | ||
| | `src/core/mxc_engine/src/policy/exact/v1_1.rs` | If the Rust SDK exposes the field, update the production development builder | | ||
| | `src/core/mxc-sdk/src/policy/exact/v1_1.rs` | If the Rust SDK exposes the field, update the production development builder | |
Comment on lines
+147
to
+149
| //! host probing, and execution live in the internal `mxc_engine` crate; | ||
| //! `mxc-sdk` owns the public policy/config authoring layer and wraps the | ||
| //! engine's streaming handle in [`Sandbox`]. |
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.



This PR moves the Rust SDK's v1 policy, containment, request,
and typed lifecycle authoring types into mxc-sdk. The engine now accepts a
normalized ExecutionRequest from either the SDK builder or the exact JSON
parser and keeps backend dispatch, host probing, telemetry, and execution in
one place.
Details
typed lifecycle SDK models into mxc-sdk under the public mxc_sdk::v1 paths.
mxc_engine::spawn_execution_request(&ExecutionRequest).
WaitOutcome APIs stable while v1::spawn_sandbox forwards request.inner to
the engine.
non-test contract dependency from mxc_engine.
and move SDK-builder validation tests with the moved SDK code.
Tests
total 283. After move: mxc_engine 90, mxc-sdk 109, mxc_ffi 84; total 283.
--all-features; cargo clippy --workspace --all-targets --all-features --
-D warnings; cargo test -p mxc_engine --all-features; cargo test -p
mxc-sdk --all-features; cargo test -p mxc_ffi --all-features; cargo test
-p wxc --all-features; RUSTDOCFLAGS=-D warnings cargo doc -p mxc-sdk -p
mxc_ffi --no-deps --all-features.
scripts/check-dotnet-bindings-codegen.js; node
scripts/versioning/check-contract-codegen.js; node
scripts/versioning/validate-configs.js; node
scripts/versioning/check-tests-present.js.
Microsoft Reviewers: Open in CodeFlow