You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consolidate Rust SDK crates into one publishable package - #1390
Consolidates the Rust SDK's internal engine, contracts, shared runtime, telemetry, PTY support, build support, learning-mode logic, and backend implementations into the single publishable mxc-sdk package.
Reduces the crates.io publication requirement for mxc-sdk from 22 publishable crates to 1:
Before
After
Publishable crates required to publish mxc-sdk
22
1
Total workspace crates required to build mxc-sdk
23
1
Before consolidation, mxc-sdk depended on 21 separately publishable internal crates and the non-publishable isolation_session_bindings build crate. Those internal dependencies are now Rust modules inside mxc-sdk, so the published SDK has no local crate dependencies.
Renames the consolidated shared module from wxc_common to mxc_common. The embedded exact-contract module is named mxc_contract and retains the v0.9, v1.0, and development v1.1 contracts.
Keeps deliberate process and package boundaries intact: mxc_ffi, thin executor packages (wxc, lxc, and mxc_darwin), host helpers, test tools, and language SDKs remain separate.
Publishes the Windows Sandbox daemon/guest and WSLC daemon as mxc-sdk Cargo [[bin]] targets. WSLC remains gated by the wslc feature.
Updates schema generation, bindings generation, versioning checks, documentation, and GitHub/Azure CI selectors for the consolidated module paths.
Final Rust workspace layout (crate marks a directory with its own Cargo.toml; module marks code compiled as part of mxc-sdk):
If this PR changes Cargo.lock, the dependency-feed-check check passes (see docs/pull-requests.md)
📋 Issue Type
Bug fix
Feature
Task
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 GitHub
Actions build; it runs on merge to main, and Microsoft reviewers with write access can trigger it
on a PR with /azp run. See docs/pull-requests.md.
If the dependency-feed-check check fails on a new dependency, the crate must be added to
the feed before the PR can pass. See docs/pull-requests.md
for the steps.
Move backend and core libraries into the single publishable mxc-sdk crate, retain executable and FFI boundaries, and include the Windows Sandbox and WSLC sidecars as binary targets. Update workspace consumers, build tooling, package assets, and documentation.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 433e5b70-c2bd-496d-9b8d-bd2085bb2706
Rename the consolidated exact-contract module and integration tests to mxc_contract, update registry and CI paths, and document how mxc-sdk Cargo binary targets are built. Ensure the WSLC binary feature activates its tar dependency.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 433e5b70-c2bd-496d-9b8d-bd2085bb2706
Run the renamed v1.0 and v1.1 contract integration tests instead of referencing the nonexistent v0.10 target in GitHub and ADO validation.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 433e5b70-c2bd-496d-9b8d-bd2085bb2706
Consolidates Rust SDK internals, backends, build helpers, contracts, and tests into the publishable mxc-sdk crate while retaining executable and FFI boundaries.
Changes:
Moves internal crates and backend modules into mxc-sdk.
Migrates exact-contract fixtures, adapters, and integration tests.
Updates build tooling, documentation, and CI package references.
Migrate stale end-to-end commands to mxc-sdk integration targets
CONTRIBUTING.md:243
This updates the unit-test commands, but the end-to-end commands later in this section—and tests/scripts/README.md—still invoke the deleted wxc_e2e_tests package. Following the documented workflow now fails package resolution; migrate those commands to the moved mxc-sdk integration-test targets too.
This consolidated contract command omits the mxc-sdk library target, so the schema invariant unit tests under core/mxc_contract do not run with schema-gen. The old package-wide command covered those tests; include --lib here as well as the named integration targets.
Include mxc-sdk library tests in schema-gen coverage
.github/workflows/Versioning.Checks.Job.yml:49
This target selection runs only the seven integration-test binaries, so the contract unit tests moved into mxc-sdk are no longer exercised with schema-gen. In particular, the schema invariant tests in core/mxc_contract/{dev,published/*}/schema.rs require both cfg(test) and this feature; add the library target to preserve the coverage previously provided by cargo test -p mxc_config_contract --all-features.
Update E2E commands to use mxc-sdk integration tests
CONTRIBUTING.md:243
The consolidation updates the library-test examples but leaves the E2E commands later in this same block selecting the deleted wxc_e2e_tests package. Those documented commands now fail package resolution; switch them to the integration tests hosted by mxc-sdk.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
Developer documentation still invokes removed Cargo packages and must be migrated to the consolidated test targets.
Review effort: Balanced Findings: None
Previously missed (1)
In code that hasn't changed since last review
Update documentation to use migrated package and test targets
docs/ci-validation-infrastructure.md:255
The documentation migration is incomplete: README.md:125,141 still selects the removed seatbelt_common and wxc_e2e_tests packages, and tests/scripts/README.md:5,158-168,196 still tells users to run wxc_e2e_tests. These commands now fail package selection; migrate them to mxc-sdk and the moved integration-test targets so the PR's developer guidance remains runnable.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
The broad cross-platform crate and build-boundary migration needs final human review, particularly because host-dependent backend workloads were not executed.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
The crate-boundary rewrite affects publishing, platform backends, build scripts, CI, and contract compatibility, while host-dependent workloads were not exercised.
Review effort: Balanced Findings: None
Previously missed (1)
In code that hasn't changed since last review
Update example command for consolidated mxc-sdk package
This example now belongs to mxc-sdk, but its usage block still says cargo run -p process_container_common --example lm_capture. That package was removed by this consolidation, so the documented command fails package resolution; update it to select mxc-sdk and the new example name (process_container_common_lm_capture).
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
The architecture-wide consolidation affects packaging, platform-specific builds, contracts, and host-dependent backends that were not exercised end to end.
Bring the prototype onto the MXC 1.0 SDKs: the consolidated mxc-sdk crate
(microsoft#1390), the v1 ContainerRequest surfaces in Rust, Node and .NET, exact
JSON FFI ingress, and Promise-based Node v1 APIs (microsoft#1398).
Shared files take upstream as-is. The previous SDK wiring (mxc-sdk
re-exports, mxc_ffi exports, Node and .NET wrappers, and their tests)
targeted the retired SandboxPolicy surfaces and is removed here; the
following commits port the store into mxc-sdk's internal policy_store
module and rebuild the bindings on the v1 requirements API from spec
f7a450c. The catalog crate under src/core/mxc_policy_store is left
outside the workspace until that port.
Co-authored-by: Copilot <[email protected]>
The concurrent one-shot test took its evidence from markers each
session's workload appended to a shared host folder. Those writes
sometimes failed with "Stream was not readable." while the workload
carried on and exited 0, so the test reported a session cut short when
it had run to completion. It also never checked that the sessions
overlapped.
Each workload now prints "X-started", waits in `set /p` for a line on
stdin, and echoes the line back. The harness starts A, B and C one at a
time, then releases B, A and C in turn, waiting for each wxc-exec to
exit before the next release. wxc-exec exits only after its session's
teardown, so each later session is shown to run through every earlier
session's teardown. No session writes a file, so the shared folder and
its ACL grant are gone. The agent-name lookup goes too: #1390 removed
the log line it matched.
Each session starts through Start-Process, which does not pass the
suite's stdout and stderr on to cmd.exe, so a wxc-exec left running
after a timeout cannot keep a caller reading the suite's output
waiting. Stdin comes from a named pipe with a 4096-byte output buffer:
wxc-exec reads stdin only while the workload runs, so without the
buffer a line sent to a session still provisioning or already tearing
down would wait for that step.
On any failure the harness sends ABORT to every session still held, so
each one still ends and tears down normally, and a failing session's
result carries the tail of its output. The exit code reports the
workload, not the teardown: detecting a leaked account stays with the
account check around the isolation-session suites.
Fixes#1650
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 44ff8469-1843-47ee-8b4a-1323cbba2bd0
The concurrent one-shot test took its evidence from markers each
session's workload appended to a shared host folder. Those writes
sometimes failed with "Stream was not readable." while the workload
carried on and exited 0, so the test reported a session cut short when
it had run to completion. It also never checked that the sessions
overlapped.
Each workload now prints "X-started", waits in `set /p` for a line on
stdin, and echoes the line back. The harness starts A, B and C one at a
time, then releases B, A and C in turn, waiting for each wxc-exec to
exit before the next release. wxc-exec exits only after its session's
teardown, so each later session is shown to run through every earlier
session's teardown. No session writes a file, so the shared folder and
its ACL grant are gone. The agent-name lookup goes too: #1390 removed
the log line it matched.
Each session starts through Start-Process, which does not pass the
suite's stdout and stderr on to cmd.exe, so a wxc-exec left running
after a timeout cannot keep a caller reading the suite's output
waiting. Stdin comes from a named pipe with a 4096-byte output buffer:
wxc-exec reads stdin only while the workload runs, so without the
buffer a line sent to a session still provisioning or already tearing
down would wait for that step.
On any failure the harness sends ABORT to every session still held, so
each one still ends and tears down normally, and a failing session's
result carries the tail of its output. The exit code reports the
workload, not the teardown: detecting a leaked account stays with the
account check around the isolation-session suites.
Fixes#1650
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 44ff8469-1843-47ee-8b4a-1323cbba2bd0
The concurrent one-shot test took its evidence from markers each
session's workload appended to a shared host folder. Those writes
sometimes failed with "Stream was not readable." while the workload
carried on and exited 0, so the test reported a session cut short when
it had run to completion. It also never checked that the sessions
overlapped.
Each workload now prints "X-started", waits in `set /p` for a line on
stdin, and echoes the line back. The harness starts A, B and C one at a
time, then releases B, A and C in turn, waiting for each wxc-exec to
exit before the next release. wxc-exec exits only after its session's
teardown, so each later session is shown to run through every earlier
session's teardown. No session writes a file, so the shared folder and
its ACL grant are gone. The agent-name lookup goes too: #1390 removed
the log line it matched.
Each session starts through Start-Process, which does not pass the
suite's stdout and stderr on to cmd.exe, so a wxc-exec left running
after a timeout cannot keep a caller reading the suite's output
waiting. Stdin comes from a named pipe with a 4096-byte output buffer:
wxc-exec reads stdin only while the workload runs, so without the
buffer a line sent to a session still provisioning or already tearing
down would wait for that step.
On any failure the harness sends ABORT to every session still held, so
each one still ends and tears down normally, and a failing session's
result carries the tail of its output. The exit code reports the
workload, not the teardown: detecting a leaked account stays with the
account check around the isolation-session suites.
Fixes#1650
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 44ff8469-1843-47ee-8b4a-1323cbba2bd0
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
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
Consolidates the Rust SDK's internal engine, contracts, shared runtime, telemetry, PTY support, build support, learning-mode logic, and backend implementations into the single publishable
mxc-sdkpackage.Reduces the crates.io publication requirement for
mxc-sdkfrom 22 publishable crates to 1:mxc-sdkmxc-sdkBefore consolidation,
mxc-sdkdepended on 21 separately publishable internal crates and the non-publishableisolation_session_bindingsbuild crate. Those internal dependencies are now Rust modules insidemxc-sdk, so the published SDK has no local crate dependencies.Renames the consolidated shared module from
wxc_commontomxc_common. The embedded exact-contract module is namedmxc_contractand retains the v0.9, v1.0, and development v1.1 contracts.Keeps deliberate process and package boundaries intact:
mxc_ffi, thin executor packages (wxc,lxc, andmxc_darwin), host helpers, test tools, and language SDKs remain separate.Publishes the Windows Sandbox daemon/guest and WSLC daemon as
mxc-sdkCargo[[bin]]targets. WSLC remains gated by thewslcfeature.Updates schema generation, bindings generation, versioning checks, documentation, and GitHub/Azure CI selectors for the consolidated module paths.
Final Rust workspace layout (
cratemarks a directory with its ownCargo.toml;modulemarks code compiled as part ofmxc-sdk):🔗 References
🔍 Validation
cargo fmt --manifest-path src\Cargo.toml --all -- --checkcargo check --manifest-path src\Cargo.toml --workspace --all-targetscargo clippy --locked --manifest-path src\Cargo.toml -p mxc-sdk --all-targets --all-features -- -D warningsmxc_contract_*integration-test targets with--features schema-gencargo check --locked --manifest-path src\Cargo.toml -p mxc-sdk --bins --features wslcmxc-sdk,lxc,unix_test_proxy, andmxc_ffinode scripts\versioning\check-contract-codegen.jsnode scripts\versioning\check-schema-versions.jsnode scripts\versioning\check-rust-toolchain-sync.jscargo publish --dry-run --locked --manifest-path src\Cargo.toml -p mxc-sdk --registry crates-iochacha20to0.10.2andspinto0.12.3.cargo package -p mxc-sdk --locked --allow-dirty --list, including the staged WSLC SDK package.✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see docs/pull-requests.md)📋 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 docs/pull-requests.md.If the
dependency-feed-checkcheck fails on a new dependency, the crate must be added tothe feed before the PR can pass. See docs/pull-requests.md
for the steps.