PoC: add named MXC execution targets - #937
Nikola Metulev (nmetulev) wants to merge 2 commits into
Conversation
Reuse target orchestration and the guest agent for named MXC isolation sessions, with explicit deletion and attach-only UI routing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Build Metrics ReportValidation did not pass. Artifacts were uploaded before validation finished; check the workflow run before using them. Binary Sizes
.NET Test Results (TRX reports)Other suites are reflected in the overall validation status above. ✅ 7879 passed, 37 skipped out of 7916 tests in 1344.1s (+263.1s vs. baseline) Test Coverage✅ 85.8% line coverage, 80.5% branch coverage · CLI Startup Time59ms median (x64, Try This BuildInstalls the MSIX for your architecture, replacing any previously installed build. Needs the GitHub CLI — the command offers to install it and sign you in if it is missing. & ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) 937Switching between builds often?Put the tool on your PATH once: & ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) -AddToPathThen this build is just: winapp-pr 937Run Updated 2026-09-25 03:06:33 UTC · commit |
RECOMMEND: Drop the |
Description
Minimal experimental MXC provider built on the execution-target infrastructure shipped in #779. It lets multiple workers run apps in separate Windows user sessions while reusing the existing deployment, guest-agent, UI routing, and artifact-transfer code.
--on mxc:<name>creates/reuses a named isolation session forrun;target exec/push/pulluse the same target. Baremxcselectsdefault.target delete mxc:<name>explicitly removes that named session. It attempts to unregister development packages under its managed workspace before deleting the user.This is a draft testing vehicle, not a production-ready provider. No documentation, generated schema, or test files are added or changed in this PR.
Usage Example
Prerequisites
Use Windows with the MXC isolation-session feature available. The native MXC executor must support schema
0.9.0-alpha. The published MXC0.8.0executor used in the earlier investigation does not support this request shape; the current source build still reports version0.8.0, so identify it by commit rather than that version alone.Validated with microsoft/mxc commit
195193f6b574d343ec435962b574dbf2e70a9fb1. Build the MXC executor from that checkout'ssrcdirectory:Then, from this winapp checkout:
Names are normalized lowercase and accept 1–64 ASCII letters, digits, or hyphens. They are scoped to the calling Windows account on the host, not to the project directory. Use a published winapp executable rather than
dotnet run, because the same self-contained executable is staged into the guest.Packaged WinUI prerequisite on the tested build: the MXC team's traditional/full-session configuration (
HKLM\SYSTEM\CurrentControlSet\Services\IsoEnvBroker\SessionConfigIdOverride, DWORD3) was selected before starting fresh sessions. This is an administrator-controlled, machine-wide experimental setting: coordinate with the MXC team, use a test machine, and restore the original value afterward. This PR does not change that setting, deployment policies, certificates, Windows features, or feature flags automatically.Related Issue
Related to #779 (merged execution-target foundation).
Type of Change
Checklist
Screenshots / Demo
Live CLI/OS checks completed with the locally built PoC:
run --on mxc:todo; routed UI inspection, text setting, add/complete actions, and screenshot retrieval succeeded.Add-AppxPackage -Paththroughtarget execfor both concurrent users; both registrations reportedIsDevelopmentMode=false.Validation: x64 and ARM64 NativeAOT publication via
scripts\build-cli.ps1 -SkipAll; 297 existing focused target/process/sandbox-run tests passed, with no failures or skips. npm's local binaries were refreshed from those publish outputs. Independent focused code review found no significant issues. CI is separate and has not yet been established by these local results.Additional Notes
0x80073D23; packaged activation-manager creation still returns0x80040154. Full-session real keyboard input still encountersforeground_not_target; the input safety check is not disabled and no shell-termination workaround is included.target deletetears down the whole selected environment, including its running apps. Arbitrary packages installed withtarget execare not tracked by winapp; explicitly remove those packages before deleting the session when testing package-cleanup behavior.