Skip to content

[IsolationSession] Fork availability checks, error handling, and process-option building into Preview and GA paths - #1938

Draft
Dom Giandinoto (daamenik) wants to merge 2 commits into
mainfrom
user/dgiandinoto/1858-availability-errors-process-options
Draft

Dom Giandinoto (daamenik) wants to merge 2 commits into
mainfrom
user/dgiandinoto/1858-availability-errors-process-options

Conversation

@daamenik

@daamenik Dom Giandinoto (daamenik) commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

📖 Description

Phase 5 of implementing the GA Migration framework for the IsoSession backend.

PRs #1871 and #1931 forked some areas of the IsoSession backend into paths for the GA and Preview implementations to be developed separately. Bindings to OS APIs are used in the following other areas of MXC's IsoSession backend, and are split in this PR:

Availability (availability.rs)

  • The only function here that uses OS APIs is probe_feature_level(), which has been split into one function per implementation.
  • The public function is_isolation_session_available() had to branch into separate paths in order to check the runtime being used and call the corresponding probe_feature_level*() function. The cached value for the feature level result has also been split for each implementation.
    • NOTE: --probe probes for the legacy implementation; --probe --experimental --use-new-isosession checks for the new implementation.

Errors (error.rs)

  • The only functions here that use OS APIs are format_iso_error() (which uses IsoSessionError) and check_result() (which uses IsoSessionResult). These are public methods, but their only callers are IsolationSessionManager methods. I have thus moved them into each manager implementation file.

Remarks on check_result()
Preview impl can remain the same; GA impl will need supplemental check_result() methods to deal with the new GA result types, or refactoring to take in IsoError() instead. Implementation out of scope of this change, but worth noting.

Process Options (process_options.rs)

  • build_iso_process_options() is the only OS API caller. It translates an MXC-internal ProcessOptions object (gathered from an ExecutionRequest) into an IsoSessionProcessOptions object to send to the IsoSession service. Its only caller is IsolationSessionManager::start_process(). Like the methods in the Errors section, I moved it to each manager implementation file.

🔗 References

Resolves #1858.

🔍 Validation

✅ Checklist

  • Signed the Contributor License Agreement
  • Linked to an issue
  • For features or changes requiring a spec: linked the issue with maintainer-applied feature-accepted
  • Before merging implementation: linked the required maintainer-approved design/API spec, or explained why no spec is required
  • Feature issue remains open unless this PR completes all agreed implementation, validation, and documentation
  • Updated documentation (if applicable)
  • Updated Copilot instructions (if build, architecture, or conventions changed)
  • If this PR changes Cargo.lock, the dependency-feed-check check passes (see pull request builds)

📋 Issue Type

  • Bug fix
  • Feature
  • Task
Microsoft Reviewers: Open in CodeFlow

Copilot AI max review requested due to automatic review settings December 4, 2026 22:31
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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.

🟡 Changes recommended

Availability probing ignores the explicit new-implementation selection and still uses the legacy branch, leaving the intended CLI path unexercised.

1 open issue
What changed in this PR

Prepares MXC’s IsolationSession backend for GA migration by separating legacy and new implementation helpers.

Changes:

  • Split availability probes and caches by implementation.
  • Move WinRT error handling and process-option construction into each manager.
  • Add a selected-cache unit test.
File Description
src/​mxc-sdk/​src/​backends/​isolation_session/​common/​process_options.rs Retains internal options and shares redirect constants.
src/​mxc-sdk/​src/​backends/​isolation_session/​common/​manager_new.rs Adds implementation-local WinRT helpers.
src/​mxc-sdk/​src/​backends/​isolation_session/​common/​manager_legacy.rs Adds legacy WinRT helpers.
src/​mxc-sdk/​src/​backends/​isolation_session/​common/​error.rs Keeps shared error classification separate from WinRT calls.
src/​mxc-sdk/​src/​backends/​isolation_session/​common/​availability.rs Separates probes and caches; adds cache-selection coverage.

Review effort: Max

Copilot AI max review requested due to automatic review settings December 5, 2026 01:44

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.

🟡 Changes recommended

Existing tests do not verify which implementation --probe selects, so incorrect routing could pass validation because both implementations return the same result.

1 open issue
1 resolved since last review

Review effort: Max

Comment thread src/tools/wxc/src/main.rs
} else {
mxc_sdk::mxc_common::models::ExecutionRequest::default()
};
request.use_new_isosession = Some(cli.use_new_isosession);

This branch has not been deployed

No deployments
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.

[IsolationSession] Fork availability checks, error handling, and process-option building into Preview and GA paths

2 participants