Repository navigation
[IsolationSession] Drive the concurrent one-shot test over stdin - #1766
Merged
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The isolation test can accept failed teardown or a stale release response, and it can continue while a timed-out executor is still running.
3 open issues
What changed in this PR
This PR addresses #1650 by replacing unreliable workload-written log files with stdin-controlled coordination in MXC’s Windows isolation-session concurrency test.
Changes:
- Start sessions A, B, and C sequentially, then release them in B–A–C order to exercise overlapping lifetimes and teardown.
- Validate captured start/release markers and exit codes, with ABORT handling and bounded failure diagnostics.
- Update all three workloads to wait on stdin and use 180-second timeouts.
| File | Description |
|---|---|
tests/scripts/run_isolation_session_tests.ps1 |
Replaces shared-log assertions with stdin coordination and capture-based checks. |
tests/configs/isolation_session_concurrent_C.json |
Makes C wait for and echo stdin; increases its timeout. |
tests/configs/isolation_session_concurrent_B.json |
Makes B wait for and echo stdin; increases its timeout. |
tests/configs/isolation_session_concurrent_A.json |
Makes A wait for and echo stdin; increases its timeout. |
Review effort: Balanced
adpa-ms
force-pushed
the
user/adibpa/copilot-iso-concurrent-oneshot
branch
from
November 13, 2026 21:48
cb8bfcf to
0b2ce00
Compare
The concurrent one-shot test took its evidence from markers each session's workload appended to a shared host folder. Those writes sometimes failed with "Stream was not readable." while the workload carried on and exited 0, so the test reported a session cut short when it had run to completion. It also never checked that the sessions overlapped. Each workload now prints "X-started", waits in `set /p` for a line on stdin, and echoes the line back. The harness starts A, B and C one at a time, then releases B, A and C in turn, waiting for each wxc-exec to exit before the next release. wxc-exec exits only after its session's teardown, so each later session is shown to run through every earlier session's teardown. No session writes a file, so the shared folder and its ACL grant are gone. The agent-name lookup goes too: #1390 removed the log line it matched. Each session starts through Start-Process, which does not pass the suite's stdout and stderr on to cmd.exe, so a wxc-exec left running after a timeout cannot keep a caller reading the suite's output waiting. Stdin comes from a named pipe with a 4096-byte output buffer: wxc-exec reads stdin only while the workload runs, so without the buffer a line sent to a session still provisioning or already tearing down would wait for that step. On any failure the harness sends ABORT to every session still held, so each one still ends and tears down normally, and a failing session's result carries the tail of its output. The exit code reports the workload, not the teardown: detecting a leaked account stays with the account check around the isolation-session suites. Fixes #1650 Co-authored-by: Copilot <[email protected]> Copilot-Session: 44ff8469-1843-47ee-8b4a-1323cbba2bd0
adpa-ms
force-pushed
the
user/adibpa/copilot-iso-concurrent-oneshot
branch
from
November 14, 2026 00:47
0b2ce00 to
1029844
Compare
Ion Vasilian (ionvasilian)
approved these changes
Nov 14, 2026
Ion Vasilian (ionvasilian)
approved these changes
Nov 14, 2026
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 concurrent one-shot test in
tests/scripts/run_isolation_session_tests.ps1took its evidence from markers each session's workload appended to a shared host folder. Those writes sometimes failed withStream was not readable.while the workload carried on and exited 0, so the test reported a session cut short that had run to completion. It also never checked that the sessions overlapped.The test now holds each session on stdin, as the Rust test
concurrent_one_shot_runs_stay_isolateddoes. Each workload printsX-started, waits inset /pfor a line, and echoes it back. The harness starts A, B and C in turn, then releases B, A and C, waiting for eachwxc-execto exit before the next release.wxc-execexits only after its session's teardown, so each later session is shown to run through every earlier session's teardown. No session writes a file.On any failure the harness sends
ABORTto every session still held, so each one ends and tears down normally. The test does not detect a failed teardown; an agent account left behind fails the account checks around the isolation-session suites.🔗 References
Fixes #1650
🔍 Validation
run_isolation_session_tests.ps1passed 10 of 10 runs under Windows PowerShell and 10 of 10 under PowerShell 7. The other isolation-session suites and the interactive scenarios passed once. No run leaked an account.set /p,exit 1, a missing start marker, a session still running after its release, a 1-second start wait, and B's release line also delivered to A.Validation.Tests.Scheduled.yml: the reworked test passed in all four isolation-session jobs, on x64 and arm64.✅ Checklist
📋 Issue Type
Microsoft Reviewers: Open in CodeFlow