Skip to content

feat(sdk): expose Windows isolation tier#638

Closed
caarlos0 wants to merge 3 commits into
microsoft:mainfrom
caarlos0:sdk-fallback
Closed

feat(sdk): expose Windows isolation tier#638
caarlos0 wants to merge 3 commits into
microsoft:mainfrom
caarlos0:sdk-fallback

Conversation

@caarlos0

@caarlos0 caarlos0 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

📖 Description

Expose the Windows process-container isolation tier through the Rust platform-support API.

  • Add a public IsolationTier enum and PlatformSupport::isolation_tier in mxc_engine.
  • Populate the tier with the in-process Windows fallback detector.
  • Re-export the platform-support types through mxc-sdk.
  • Keep the field unset on non-Windows hosts or when probing fails.
  • Document the new platform-support result.

This lets Rust callers detect BaseContainer support without spawning wxc-exec --probe.

🔗 References

No linked issue.

🔍 Validation

  • cargo test -p mxc_engine -p mxc-sdk
  • cargo clippy -p mxc_engine -p mxc-sdk --all-targets -- -D warnings
  • cargo clippy -p mxc_engine -p mxc-sdk --target x86_64-pc-windows-msvc --all-targets -- -D warnings

✅ Checklist

📋 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.

Microsoft Reviewers: Open in CodeFlow

caarlos0 and others added 2 commits July 13, 2026 15:52
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>
Copilot AI review requested due to automatic review settings July 13, 2026 18:54
@caarlos0 caarlos0 requested a review from a team as a code owner July 13, 2026 18:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 IsolationTier enum and PlatformSupport::isolation_tier to the Rust platform-support API.
  • Populate isolation_tier on 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 thread src/core/mxc-sdk/tests/sdk_helpers.rs Outdated
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>
@caarlos0

Copy link
Copy Markdown
Contributor Author

probably not needed anymore after #580

@caarlos0 caarlos0 closed this Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants