Repository navigation
[WSLC] (4/4) Expose explicit session lifecycle - #1512
Open
Soham Das (SohamDas2021) wants to merge 4 commits into
Open
Soham Das (SohamDas2021) wants to merge 4 commits into
Soham Das (SohamDas2021) wants to merge 4 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Soham Das (SohamDas2021)
added this pull request to stack #1502
October 15, 2026 23:39
Soham Das (SohamDas2021)
requested review from
a team
and
a balanced review from Copilot
October 16, 2026 02:34
Soham Das (SohamDas2021)
force-pushed
the
sohamdas2021-pr4-session-contract-and-cli
branch
from
October 16, 2026 02:50
ece05e7 to
9df17ae
Compare
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Windows VM ownership, shared-session capabilities, and store isolation warrant human review of the reported integration results.
0 open findings
What changed in this PR
Completes the WSLc session lifecycle stack for #1460, exposing explicit VM creation, sharing, and release through development request JSON, the engine, and CLI. Published contracts and SDK V1 remain unchanged.
Changes:
- Adds session operations, sizing, placement, and CLI identity routing.
- Separates session telemetry correlation and improves cold-store diagnostics.
- Adds contract and lifecycle tests, generated artifacts, and documentation.
| File | Description |
|---|---|
| tests/scripts/run_wslc_state_aware_tests.ps1 | Tests shared sessions, independent lifetimes, and cold-store refusal. |
| tests/scripts/run_wslc_all_tests.ps1 | Warms three daemon stores. |
| tests/scripts/README.md | Documents expanded test prerequisites. |
| tests/configs/wslc_state_aware_provision_session.json | Adds session creation fixture. |
| tests/configs/wslc_state_aware_provision_in_session.json | Adds named-session placement fixture. |
| tests/configs/wslc_state_aware_deprovision_session.json | Adds session release fixture. |
| src/tools/wxc/src/main.rs | Exposes session operations and identity flags. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/wslc_provision/valid/named_session.json | Covers valid session placement. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/wslc_provision_session/valid/sized.json | Covers explicit VM sizing. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/wslc_provision_session/valid/minimal.json | Covers default session creation. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/wslc_provision_session/invalid/foreign_session_id.json | Rejects identity on session creation. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/wslc_provision_session/invalid/foreign_sandbox_provision.json | Rejects sandbox configuration on session creation. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/wslc_deprovision_session/valid/minimal.json | Covers valid session release. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/wslc_deprovision_session/invalid/missing_session_id.json | Requires release identity. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures/wslc_deprovision_session/invalid/foreign_sandbox_id.json | Rejects sandbox identity for session release. |
| src/mxc-sdk/tests/mxc_contract/v1_1_0_alpha/fixtures.rs | Registers and tests session fixtures. |
| src/mxc-sdk/src/state_aware_sdk.rs | Preserves implicit placement for SDK V1. |
| src/mxc-sdk/src/core/mxc_engine/state_aware.rs | Updates correlation and session validation tests. |
| src/mxc-sdk/src/core/mxc_contract/registry.rs | Registers development session request roots. |
| src/mxc-sdk/src/core/mxc_contract/dev/state_aware/provision/wslc.rs | Adds optional session placement. |
| src/mxc-sdk/src/core/mxc_contract/dev/state_aware/provision_session.rs | Defines session creation requests. |
| src/mxc-sdk/src/core/mxc_contract/dev/state_aware/phase.rs | Recognizes session phase names. |
| src/mxc-sdk/src/core/mxc_contract/dev/state_aware/mod.rs | Exports session contract types. |
| src/mxc-sdk/src/core/mxc_contract/dev/state_aware/deprovision_session.rs | Defines session release requests. |
| src/mxc-sdk/src/core/mxc_contract/dev/schema.rs | Generates session schema branches. |
| src/mxc-sdk/src/core/mxc_contract/dev/request.rs | Parses WSLc session requests. |
| src/mxc-sdk/src/core/mxc_contract/dev/mod.rs | Exports development session types. |
| src/mxc-sdk/src/core/mxc_common/telemetry/correlation_state.rs | Keeps session operations outside sandbox correlation storage. |
| src/mxc-sdk/src/core/mxc_common/state_aware_dispatch.rs | Uses valid session IDs in tests. |
| src/mxc-sdk/src/core/mxc_common/state_aware_binding_tests.rs | Updates session binding test identities. |
| src/mxc-sdk/src/core/mxc_common/splice.rs | Updates session routing test identity. |
| src/mxc-sdk/src/core/mxc_common/sdk_input.rs | Restricts named sessions to the development contract. |
| src/mxc-sdk/src/core/mxc_common/policy_identity.rs | Records named placement without session values. |
| src/mxc-sdk/src/core/mxc_common/models.rs | Carries optional placement identity. |
| src/mxc-sdk/src/core/mxc_common/config_parser.rs | Parses session roots and validates CLI target flags. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/v1_0/state_aware.rs | Preserves published-contract implicit placement. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/v0_9/state_aware.rs | Preserves older-contract implicit placement. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/dev/state_aware.rs | Adapts session sizing and identities. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/dev/state_aware_tests/session.rs | Tests session adaptation and field presence. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/dev/state_aware_tests/mod.rs | Includes session adapter tests. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/dev/mod.rs | Routes session request adaptation. |
| src/mxc-sdk/src/backends/wslc/common/state_aware.rs | Implements session operations and validation. |
| src/mxc-sdk/src/backends/wslc/common/image.rs | Explains selected cold-store failures and recovery. |
| src/mxc-sdk/src/backends/wslc/common/daemon_client.rs | Adds session lifecycle client calls. |
| sdk/node/src/generated/v1_1_0_alpha/wire.ts | Regenerates development session types. |
| scripts/versioning/check-schema-versions.js | Checks required session request roots. |
| schemas/schema-version.json | Updates the WSLc compatibility selector. |
| schemas/dev/mxc-config.schema.1.1.0-alpha.json | Adds generated session schemas. |
| docs/telemetry.md | Links lifecycle correlation documentation. |
| docs/schema.md | Documents session requests and identity routing. |
| docs/development/build-and-test/schema-codegen.md | Updates request-root generation documentation. |
| docs/development/architecture/versioning.md | Explains development-only session availability. |
| docs/development/architecture/telemetry.md | Documents internal correlation and session separation. |
| docs/development/architecture/container-lifecycle.md | Documents session CLI transport. |
| docs/backends/wslc/wslc-state-aware.md | Explains session behavior, testing, and limitations. |
| docs/backends/wslc/wsl-container-getting-started.md | Adds session sizing and placement examples. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a56b1c8c-bb73-41f2-83c1-f27ef0f37c66
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a56b1c8c-bb73-41f2-83c1-f27ef0f37c66
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a56b1c8c-bb73-41f2-83c1-f27ef0f37c66
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a56b1c8c-bb73-41f2-83c1-f27ef0f37c66
Soham Das (SohamDas2021)
force-pushed
the
sohamdas2021-pr4-session-contract-and-cli
branch
from
October 16, 2026 03:29
9df17ae to
354d88c
Compare
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
Explicit WSLc sessions are now reachable through development
1.1.0-alphaMXC request JSON, the in-process engine, and CLI. Callers can create a VM with CPU/memory/GPU sizing, share it across sandboxes, and release it when empty. OmittingsessionIdpreserves implicit-session behavior.Dry runs validate without allocating resources, session operations avoid the sandbox correlation store, and isolated provisions identify the selected cold image store instead of reporting a misleading missing-image error. Published contracts and SDK V1 remain unchanged. Sandbox policy hashes record named-session placement but do not include the joined VM's sizing; this limitation is documented.
🔗 References
Part of #1460. Fourth of four PRs; stacked on #1503.
🔍 Validation
All results are from the rebased stack on Windows with a live WSL2 host.
From
src\:cargo fmt --all -- --checkcargo test --quiet --workspacecargo test --quiet --workspace --features wxc/wslccargo clippy --quiet --workspace --all-targets -- -D warningscargo clippy --quiet --workspace --all-targets --features wxc/wslc -- -D warningscargo build --quiet -p wxc --features wslccargo build --quiet -p mxc-sdk --features wslc --bin wxc-wslc-daemonFrom the repository root:
node .\scripts\versioning\check-schema-versions.jsnode .\scripts\versioning\validate-configs.jsnode .\scripts\versioning\check-contract-codegen.jsLive E2E: 122/122 passed, including shared sandboxes, independently releasable identically sized sessions, and the private one-warmed-slot refusal case.
Host-gated/ignored Rust cases were not enabled by the workspace commands; the live WSLc coverage above ran separately.
✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see pull request builds)📋 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 pull request builds.If the
dependency-feed-checkcheck fails on a new dependency, the crate must be added tothe feed before the PR can pass. See pull request builds
for the steps.
Microsoft Reviewers: Open in CodeFlow