Repository navigation
Fix ProcessContainer packaged-app diagnostics after process exit - #1785
Open
mapleluvr (mapleluvr) wants to merge 1 commit into
Open
mapleluvr (mapleluvr) wants to merge 1 commit into
mapleluvr (mapleluvr) wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the diagnostic-only change that avoids misreporting ordinary nonzero workload exits as packaged-app launch failures.
No open issues 🎉
What changed in this PR
Fixes #1784 by preventing the ProcessContainer CLI from reporting a packaged-app launch failure after a workload has completed with an ordinary nonzero exit. The change is limited to diagnostics; execution, containment policy, schemas, and public APIs remain unchanged.
Changes:
- Restricts the WindowsApps path heuristic to process-creation failures while preserving recognized DLL-initialization exit diagnostics.
- Adds unit regressions and a real CLI regression to scheduled native policy validation, with an optional installed-MSIX PowerShell check.
- Documents the new regression runner and its CI coverage.
| File | Description |
|---|---|
tests/scripts/run_processcontainer_policy_tests.ps1 |
Invokes the diagnostic regression and propagates failures. |
tests/scripts/run_processcontainer_launch_diagnostics_test.ps1 |
Checks zero/nonzero exits, separate output streams, host file creation, and native execution. |
tests/scripts/README.md |
Documents the runner and its prerequisites. |
src/mxc-sdk/src/backends/process_container/common/launch_diagnostics.rs |
Limits the path heuristic to creation failures and updates regression tests. |
docs/development/build-and-test/ci-validation-infrastructure.md |
Describes scheduled diagnostic coverage and the optional MSIX check. |
Review effort: Balanced
mapleluvr (mapleluvr)
marked this pull request as ready for review
November 16, 2026 05:45
Author
|
@microsoft-github-policy-service agree |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📖 Description
The ProcessContainer CLI diagnoses a nonzero exit after it has already started and waited for the child. The shared executable heuristic currently treats any
WindowsAppspath as a launch failure, so a completed workload gets an incorrect packaged-app message andbackend_error.Limit that path-only heuristic to process-creation failures. Ordinary nonzero exits receive no launch diagnosis; a recognized
STATUS_DLL_INIT_FAILEDexit still receives its exit-specific diagnosis, including for a WindowsApps path. No process execution, containment policy, schema or public API changes are needed.Based on v1.1.0 (
c66201839d63cae2239db5e92f1f1d6076cf5181). This is a diagnostic bug fix, not a new MSIX activation capability, so no design/API spec is required.Regression coverage replaces the old test that expected the incorrect diagnosis and adds a real CLI scenario to the scheduled native policy suite. The portable scenario copies inbox Windows PowerShell into a temporary WindowsApps directory; it exercises the real PSEC execution path without requiring Store provisioning.
-PackagedPowerShellalso permits a local check with an installed MSIX PowerShell executable.🔗 References
Fixes #1784.
🔍 Validation
Windows x64, native PSEC host (build 26200), Rust 1.93.0:
cargo fmt --all -- --checkpasses.cargo clippy --locked --offline --target x86_64-pc-windows-msvc --jobs 2 --workspace --all-targets -- -D warningspasses.test_native_policy_results.ps1passes; both changed PowerShell scripts have clean active language-server checks.cargo build --locked --offline --release --target x86_64-pc-windows-msvc --jobs 2 -p wxcpasses. This is a locally built 1.1.0-based fix, not an official released SDK.Not run locally: cross-platform/ARM64 builds, optional-backend suites, the complete SDK suite or the complete native UI/policy suite. The new focused case is wired into the existing scheduled ProcessContainer policy runner; a unit result alone is not being used as backend validation. The build emits the existing prerequisite warning for an unpackaged PowerShell 7 installation, which is absent on this host; the tested shells above are selected explicitly.
✅ Checklist
feature-accepted(not applicable: diagnostic bug fix)Cargo.lock, thedependency-feed-checkcheck passes (not applicable: lockfile unchanged)📋 Issue Type
Microsoft Reviewers: Open in CodeFlow