You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drains unclaimed ConPTY output before teardown so ClosePseudoConsole cannot block on a full pipe.
Limitations
PTY output is a single merged terminal stream rather than separate stdout and stderr.
BaseContainer/PSEC currently creates the child successfully but does not attach its input or output to ConPTY on the tested Windows host. The public SDK integration test therefore times out with an empty terminal transcript; this remains under investigation.
cargo test -p process_container_common host_process_uses_pseudo_console_transport -- --nocapture — passed.
cargo test -p process_container_common fallback_detector::tests — passed (26 tests).
cargo test -p process_container_common dispatcher::tests — passed (28 tests).
cargo test -p mxc-sdk --test streaming_processcontainer processcontainer_pty_supports_io_resize_and_wait -- --ignored --nocapture — currently fails on BaseContainer: TimedOut with an empty terminal transcript.
If this PR changes Cargo.lock, the dependency-feed-check check passes (see docs/pull-requests.md)
📋 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.
Reject null and invalid handles before constructing BorrowedHandle in the safe cloning helper.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 433e5b70-c2bd-496d-9b8d-bd2085bb2706
Poll the process handle before applying the elapsed timeout so a process already observed as complete is not killed or reclassified.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 433e5b70-c2bd-496d-9b8d-bd2085bb2706
Rename fallible handle conversion to try_into_std_owned_handle
src/core/wxc_common/src/process_util.rs:331
This public fallible conversion is named like an infallible Into operation, unlike the adjacent OwnedHandle::try_into_std_owned_handle API. Rename it to try_into_std_owned_handle and update its ProcessContainer call sites so callers can recognize that it may fail.
Use non-inheritable local ConPTY transport pipes and calculate blocking waits from the original execution deadline so wait and try_wait enforce the same timeout.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 433e5b70-c2bd-496d-9b8d-bd2085bb2706
Keep ConPTY transport handles alive through suspended child startup, prevent redirected host stdio inheritance, and route PTY launches to the AppContainer tier when PSEC cannot attach the pseudoconsole.
Add real Rust, Node, and .NET public SDK round-trip coverage.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 433e5b70-c2bd-496d-9b8d-bd2085bb2706
Remove the PTY-specific AppContainer fallback so ProcessContainer keeps its normal enforcement-based tier selection.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 433e5b70-c2bd-496d-9b8d-bd2085bb2706
This launch description contradicts the startup info above: PTY mode sets STARTF_USESTDHANDLES at line 1007, with null standard handles, while only bInheritHandles is false. Correct the comment so future changes do not remove a flag this implementation intentionally relies on.
Moving this one to draft. Looks like the CreateProcessSecurityEnvironment API flow doesn't currently support creating in PTYs yet.
This branch has not been deployed
No deployments
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
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
spawnWithPty.ClosePseudoConsolecannot block on a full pipe.Limitations
Architecture
flowchart LR Caller[SDK caller<br/>Rust / Node / .NET] --> Engine[mxc_engine<br/>ProcessContainer dispatch] Engine --> Select[Normal ProcessContainer tier selection] Select --> Base[BaseContainer / PSEC] Select --> App[AppContainer tier] Base --> ConPTY[ConPTY] App --> ConPTY[ConPTY] ConPTY --> Pty[MxcPty<br/>input / merged output / resize / wait] Pty --> Caller🔗 References
🔍 Validation
cargo fmt --all -- --check— passed.cargo test -p process_container_common host_process_uses_pseudo_console_transport -- --nocapture— passed.cargo test -p process_container_common fallback_detector::tests— passed (26 tests).cargo test -p process_container_common dispatcher::tests— passed (28 tests).cargo test -p mxc-sdk --test streaming_processcontainer processcontainer_pty_supports_io_resize_and_wait -- --ignored --nocapture— currently fails on BaseContainer:TimedOutwith an empty terminal transcript.cargo clippy -p process_container_common -p mxc-sdk --all-targets -- -D warnings— passed.npm run build && npm testfromsdk/node— passed (406 tests; 20 skipped).dotnet run --project Microsoft.Mxc.Sdk.Tests/Microsoft.Mxc.Sdk.Tests.csproj --no-build --no-restore -- -class Microsoft.Mxc.Sdk.Tests.MxcPtyProcessTestsfromsdk/dotnet— passed (9 tests).cargo test -p process_container_common— 323 passed; the unrelated host-loopback proxy test timed out with WinSock error 10060 on this host.✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see docs/pull-requests.md)📋 Issue Type
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 GitHubActions build; it runs on merge to
main, and Microsoft reviewers with write access can trigger iton a PR with
/azp run. See docs/pull-requests.md.If the
dependency-feed-checkcheck fails on a new dependency, the crate must be added tothe feed before the PR can pass. See docs/pull-requests.md
for the steps.
Microsoft Reviewers: Open in CodeFlow