Skip to content

Require a positive LocalAgentUser feature level for isolation_session - #960

Merged
adpa-ms merged 1 commit into
mainfrom
user/adibpa/copilot-iso-probe-feature-level
Aug 20, 2026
Merged

adpa-ms merged 1 commit into
mainfrom
user/adibpa/copilot-iso-probe-feature-level

Conversation

@adpa-ms

@adpa-ms adpa-ms commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

📖 Description

The probe reported a host as available whenever IsoSessionOps activated, but activation also succeeds where the capability the lifecycle needs is unsupported. It now requires GetFeatureLevel(LocalAgentUser) above zero as well, and treats a failed query as unavailable — failing closed, as the WSLc probe does.

Nothing on the execution path consults this probe, so running a sandbox is unaffected; --probe and platform_support are what move. The docs and skip messages around it enumerated the causes behind a false read; those enumerations are dropped rather than extended.

🔍 Validation

cargo fmt --check, cargo clippy -p isolation_session_common --all-targets -- -D warnings and cargo test -p isolation_session_common --release are green.

On a VM with the OS-side service, this build and a baseline from the merge base were run against the same host in both capability states:

Host state baseline this change
capability present true true
capability absent true false

The baseline column is the control: it shows the previous probe advertising a host that cannot run isolation sessions, and confirms the difference comes from the new check rather than from activation failing.

✅ Checklist

📋 Issue Type

  • Bug fix
Microsoft Reviewers: Open in CodeFlow

Class registration alone was reported as availability, so a host that
registers the WinRT class but does not support the capability the lifecycle
needs was advertised as able to run isolation sessions. Query the feature
level and treat anything but a positive value, including a failed query, as
unavailable.

The test-script README, the suite comments and the skip messages each
enumerated the causes behind a false read of the probe field. Drop the
enumerations rather than extend them: the text around them is about how the
suites skip, not why.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 20, 2026 00:52
@adpa-ms
adpa-ms requested a review from a team as a code owner August 20, 2026 00:52
@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.

Pull request overview

Updates IsolationSession availability detection to require the lifecycle’s LocalAgentUser capability.

Changes:

  • Queries GetFeatureLevel(LocalAgentUser) and fails closed.
  • Adds positive, zero, negative, and error-result tests.
  • Simplifies test skip messaging.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/backends/isolation_session/common/src/availability.rs Strengthens availability probing.
tests/scripts/run_isolation_session_tests.ps1 Simplifies skip details.
tests/scripts/run_isolation_session_state_aware_tests.ps1 Simplifies prerequisite and skip text.
tests/scripts/run_isolation_session_resize_smoke.ps1 Simplifies skip text.
tests/scripts/README.md Generalizes skip documentation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/backends/isolation_session/common/src/availability.rs
@adpa-ms
adpa-ms merged commit b1cb2d8 into main Aug 20, 2026
24 checks passed
@adpa-ms
adpa-ms deleted the user/adibpa/copilot-iso-probe-feature-level branch August 20, 2026 01:47
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.

3 participants