Skip to content

User/dgiandinoto/ieb regid refactor#653

Draft
daamenik wants to merge 3 commits into
feature/isolation-session-internalfrom
user/dgiandinoto/ieb-regid-refactor
Draft

User/dgiandinoto/ieb regid refactor#653
daamenik wants to merge 3 commits into
feature/isolation-session-internalfrom
user/dgiandinoto/ieb-regid-refactor

Conversation

@daamenik

@daamenik daamenik commented Jul 15, 2026

Copy link
Copy Markdown

📖 Description

Update sandbox-provision APIs to take in an appId. If "" is passed as the appId, attempt to detect the calling process's Package Family Name (PFN) and use PFN:<pfn> instead. If calling process is unpackaged, use appId verbatim.

🔗 References

Waiting on internal Microsoft PR that adds AddUserAsync2 to Windows.AI.IsolationSession.Preview namespace.

🔍 Validation

✅ 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

@daamenik
daamenik force-pushed the user/dgiandinoto/ieb-regid-refactor branch from 852d81d to 180c678 Compare July 15, 2026 23:27
…ew API (#592)

* Fix isolation_session_bindings build.rs version-check path resolution

* Migrate isolation_session backend + SDK to the IsolationSession Preview API

The IsolationSession WinRT surface MXC consumes is now frozen as the Preview
namespace. Regenerate the Rust bindings against it and reshape the consumers
to the reduced, stable API:

- bindings: regenerate from the Preview WinMD; add the windows-crate
  Foundation feature (the Preview surface references IClosable).
- backend (manager/policy/state_aware/one_shot): the OS now assigns an
  opaque agent user name at provision and validates identity/token at the
  service, so the sandbox id tail is that opaque name. Collapse the
  local/Entra provision and start paths into single token-carrying calls,
  drop host-folder sharing and the per-session sizing profile, and reject
  all filesystem/network/proxy policy at every phase. Entra is carried by
  the start config's user bundle rather than inferred from the sandbox id.
- domain/wire: remove the sizing-profile config id; regenerate the dev
  schema and the SDK wire types.
- probe: advertise isolation-session availability via `wxc-exec --probe`
  (probes.isolationSessionAvailable) instead of a registry build pin.
- SDK: drop filesystem/configurationId from the typed configs and gate the
  isolation_session method on the probe fact.

Retail CI green: fmt, clippy --all-features, build+test with the feature on
and off, SDK unit, schema/sdk-types codegen, and config validation. VM
end-to-end validation is pending.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Rework the isolation_session VM E2E corpus for the Preview API

The one-shot and state-aware PowerShell suites and their JSON fixtures
asserted behavior the Preview migration removed. Bring them in line with
the new backend:

- drop the filesystem-sharing, path-filter, sizing-profile (configurationId)
  and start-identity cross-check tests (and their fixtures);
- assert that filesystem policy is now rejected (policy_validation) at
  provision as well as the post-provision phases;
- assert the sandbox id tail is the opaque OS-assigned agent user name
  rather than a client-minted token;
- rework the simultaneous-sandbox and concurrent one-shot tests to use
  per-sandbox %TEMP% markers / a host ACL grant instead of folder sharing;
- add a fixture proving an unknown configurationId is gracefully ignored.

Verified end-to-end on an isolation-capable VM: one-shot 11/11,
state-aware 42/42, SDK node integration 2/2 (55/55). Config schema
validation green (157 configs).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Refresh isolation_session docs and comments after the Preview migration

Post-migration review found documentation and comment staleness left
behind by the Preview migration (no functional defects). Bring the prose
in line with the shipped backend:

- rename the three isolation-session docs to drop the "initial-plan"
  framing (now living specs): initial-bringup-plan -> oneshot and
  state-aware-{rust,typescript}-initial-plan -> state-aware-{rust,typescript};
  update all inbound links (copilot-instructions, sdk/README).
- correct the stale policy matrix and prose: filesystem policy is now
  rejected (policy_validation) at every phase; remove the deleted
  configurationId / v2-interface / UPN-match / registration content; the
  sandbox id tail is the opaque OS-assigned agent user name.
- scrub residual internal names from MXC prose/comments: IsoEnvBroker,
  IsoSessionApp.dll, and the pre-Preview Windows.AI.IsolationEnvironment
  namespace -> Windows.AI.IsolationSession.Preview; genericize bringup-era
  OS-side names (agent-user format, host binary, worker-process interface).
- rewrite the Lifecycle E "registration leak" test comments to the
  per-agent-user isolation rationale (RemoveUserAsync is per user) and
  disambiguate two identical assert messages.
- refresh the stale configurationId sample in a content-agnostic
  config_parser test to a user bundle.
- fix the IsolationSession row in copilot-instructions (filesystem
  rejected at every phase; drop ShareFolderBatchAsync/IsoSessionApp.dll).

Retail CI green: fmt, clippy, build x64+arm64 with the feature on, unit
tests feature on (359) and off (397), wxc_host_prep (17, elevated).
Re-verified end-to-end on an isolation-capable VM: 55/55 (one-shot 11,
state-aware 42, SDK node 2).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Surface agent SID and shared ephemeral workspace from the Preview API

The IsolationSession Preview API gained two provision-time getters on
`IsoSessionUserResult` (`AgentUserSid`, `EphemeralWorkspacePath`).
Regenerate the bindings and surface both as provision metadata:

- bindings: regenerate from the newer Preview WinMD; the only surface
  change is the two additive getters (the `IIsoSessionUserResult` IID
  recomputes accordingly). No other interface changed.
- manager: `add_user` now returns a `ProvisionedUser` carrying the agent
  user name, the agent SID, and the shared ephemeral workspace path
  (read from the three `IsoSessionUserResult` getters).
- state-aware: extend `IsolationSessionProvisionMetadata` with
  `agentUserSid` and `ephemeralWorkspacePath` and populate them at
  provision. The `sandboxId` tail (the addressing key) is unchanged.
- one-shot: adapt the `add_user` call site; one-shot still returns no
  provision metadata, so it surfaces nothing new.
- SDK: add the two fields to the `IsolationSessionProvisionMetadata`
  type and refresh the unit-test fixtures.

The ephemeral workspace is a directory shared between the calling user
and the isolated agent user (the caller can stage files into the
session through it); each isolated user can access only its own
workspace, and it is deleted when the sandbox is deprovisioned. It does
not change the workload's working directory.

Tests:
- Rust unit: provision metadata serializes to exactly the three
  camelCase wire keys.
- VM state-aware E2E (Lifecycle F): metadata presence, caller<->session
  file sharing, cross-session workspace isolation (a session cannot
  read a peer's workspace), and workspace deletion on deprovision.
- SDK integration: asserts the new metadata fields are present.

Validation: fmt, clippy (all-features), build + unit tests feature on
and off, wxc_host_prep (elevated), SDK unit, schema/sdk-types codegen,
config validation -- all green. Clean-room package build (x64 + arm64)
green. VM end-to-end on an isolation-capable build: 62/62 (one-shot 11,
state-aware 49, SDK node 2); manual TTY operator-confirmed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: adpa-ms <>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@adpa-ms
adpa-ms force-pushed the feature/isolation-session-internal branch from 2bd724b to b4786dd Compare July 18, 2026 05:24
@daamenik
daamenik force-pushed the user/dgiandinoto/ieb-regid-refactor branch from 6d6a04a to 68f0920 Compare July 20, 2026 18:58
@adpa-ms
adpa-ms force-pushed the feature/isolation-session-internal branch from b4786dd to 9702c33 Compare July 21, 2026 18:56
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