feat(sdk): expose Windows isolation tier#638
Closed
caarlos0 wants to merge 3 commits into
Closed
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e1e98422-7d07-4a58-923f-c57be100b846 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Expose Windows process-container isolation tier information through the Rust mxc-sdk platform-support surface so Rust callers can distinguish BaseContainer vs AppContainer-based execution without spawning wxc-exec --probe.
Changes:
- Add a public
IsolationTierenum andPlatformSupport::isolation_tierto the Rust platform-support API. - Populate
isolation_tieron Windows using the in-process fallback detector; keep it unset elsewhere. - Add unit test assertions and document the new field in the crate README.
Show a summary per file
| File | Description |
|---|---|
| src/core/mxc-sdk/src/platform.rs | Adds IsolationTier + PlatformSupport::isolation_tier and populates it on Windows via fallback detection. |
| src/core/mxc-sdk/src/lib.rs | Re-exports IsolationTier from the crate root. |
| src/core/mxc-sdk/tests/sdk_helpers.rs | Extends platform-support tests to cover isolation_tier behavior. |
| src/core/mxc-sdk/README.md | Documents the new Windows-specific platform-support output. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Low
Comment on lines
+91
to
+96
| .ok() | ||
| .map(|decision| match decision.tier { | ||
| BackendIsolationTier::BaseContainer => IsolationTier::BaseContainer, | ||
| BackendIsolationTier::AppContainerBfs => IsolationTier::AppContainerBfs, | ||
| BackendIsolationTier::AppContainerDacl => IsolationTier::AppContainerDacl, | ||
| }); |
Comment on lines
+226
to
+229
| assert_eq!( | ||
| isolation_tier == IsolationTier::BaseContainer, | ||
| appcontainer_common::fallback_detector::is_base_container_usable() | ||
| ); |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e1e98422-7d07-4a58-923f-c57be100b846 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Contributor
Author
|
probably not needed anymore after #580 |
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
Expose the Windows process-container isolation tier through the Rust platform-support API.
IsolationTierenum andPlatformSupport::isolation_tierinmxc_engine.mxc-sdk.This lets Rust callers detect BaseContainer support without spawning
wxc-exec --probe.🔗 References
No linked issue.
🔍 Validation
cargo test -p mxc_engine -p mxc-sdkcargo clippy -p mxc_engine -p mxc-sdk --all-targets -- -D warningscargo clippy -p mxc_engine -p mxc-sdk --target x86_64-pc-windows-msvc --all-targets -- -D warnings✅ 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.
Microsoft Reviewers: Open in CodeFlow