Skip to content

Promote WSLc from experimental to the stable config surface - #1063

Closed
Soham Das (SohamDas2021) wants to merge 1 commit into
user/sodas/wslc-rejection-hardeningfrom
user/sodas/wslc-promote-to-stable
Closed

Promote WSLc from experimental to the stable config surface#1063
Soham Das (SohamDas2021) wants to merge 1 commit into
user/sodas/wslc-rejection-hardeningfrom
user/sodas/wslc-promote-to-stable

Conversation

@SohamDas2021

@SohamDas2021 Soham Das (SohamDas2021) commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Promotes the WSLc backend out of experimental onto the stable top-level config surface, following the Seatbelt promotion precedent already established in this repo.

WSLc is now configured through the top-level wslc section instead of experimental.wslc, and selecting "containment": "wslc" no longer requires --experimental (CLI), { experimental: true } (TypeScript SDK), or SandboxRequest::set_experimental(true) (Rust SDK). A build with the wslc Cargo feature is still required.

Closes #1049

Wire + schema

  • Moved wslc from wire::Experimental to the MxcConfig root, and from experimental.rs to stable.rs in the 0.9.0-alpha closed contract (deleted from OneShotExperimental).
  • Kept experimental.wslc as a rejection alias so a pre-promotion config fails with an actionable migration message ('experimental.wslc' has moved to the stable section; use top-level 'wslc' instead.) rather than being silently ignored.
  • Regenerated all four artifacts: schemas/dev/mxc-config.schema.0.9.0-{dev,alpha}.json and sdk/node/src/generated/{,v0_9_0_alpha/}wire.ts.

Parser + state-aware dispatch

The generic state-aware dispatcher hard-coded experimental.<backend>.<phase>. Generalized with:

  • SectionRoot { Experimental, Stable }, exposed as StatefulSandboxBackend::SECTION_ROOT (defaults to Experimental; only WslcStateAwareRunner overrides it).
  • ParsedStateAwareRequest.stable_raw, the presence gate for stable-rooted backends.
  • locate_phase_fragment now takes the root and skips the experimental descent for Stable.

The experimental gate is dropped for WSLc on both the one-shot and state-aware surfaces.

TypeScript SDK

  • wslc moved out of ContainerConfig.experimental and off ExperimentalBackends.
  • Added BACKEND_SECTION_ROOT, the TS twin of the Rust SectionRoot, typed as an exhaustive Record<StateAwareContainmentBackend, …> so adding a backend without declaring a root is a compile error.
  • Fixed a latent gap this promotion unmasked: removing the experimental gate revealed that wslc was never in availableMethods — the experimental error had always been thrown first and masked it. Post-promotion this would have made WSLc completely unreachable through the SDK. Added a wslcAvailable probe fact end to end (appcontainer_common::probe::ProbeFactsmxc_engine::wslc_available()wxc-exec --probeplatform.ts), mirroring isolationSessionAvailable.

Rust SDK, corpus, harnesses, docs

  • Dropped the set_experimental(true) requirement from mxc-sdk docs, README, and Cargo.toml.
  • Hoisted experimental.wslc → top-level wslc in 31 test configs (tests/configs/, tests/examples/).
  • Removed --experimental from all WSLc test harnesses (run_wslc_all_tests.ps1, run_wslc_state_aware_tests.ps1, and the five per-scenario scripts).
  • Updated docs/wsl/*, docs/schema.md, docs/state-aware-lifecycle/*, sdk/node/README.md, scripts/setup-wslc.ps1, and the WSLc row in .github/copilot-instructions.md.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --features wxc/wslc -- -D warnings
  • cargo test -p wxc_common -p wslc_common -p mxc_engine -p wxc -p mxc-sdk --features wxc/wslc,mxc-sdk/wslc
  • cargo test -p mxc_config_contract --features schema-gen — 707 tests
  • cd sdk/node && npm test — 283 tests, 0 fail
  • All versioning gates: check-schema-versions, check-schema-codegen, check-sdk-types-codegen, check-contract-codegen, validate-configs (267 configs), check-version-sync, check-rust-toolchain-sync, check-psec-codegen, check-dotnet-errorcode-parity

Notes

Microsoft Reviewers: Open in CodeFlow

Closes #1049

WSLc is now configured through the top-level `wslc` section instead of
`experimental.wslc`, and selecting `"containment": "wslc"` no longer
requires `--experimental` / `{ experimental: true }` /
`SandboxRequest::set_experimental(true)`. This mirrors the Seatbelt
promotion precedent.

Wire + schema
- Move `wslc` from `wire::Experimental` to the `MxcConfig` root, and from
  `experimental.rs` to `stable.rs` in the 0.9.0-alpha closed contract.
- Keep `experimental.wslc` as a rejection alias so a pre-promotion config
  fails with an actionable migration message rather than being silently
  ignored.
- Regenerate the two dev schemas and the two TypeScript wire oracles.

Parser + dispatch
- Generalize the state-aware dispatcher with `SectionRoot`
  (`Experimental` | `Stable`); `StatefulSandboxBackend::SECTION_ROOT`
  defaults to `Experimental` and only `WslcStateAwareRunner` overrides it.
  `ParsedStateAwareRequest` gains `stable_raw` for stable-rooted backends.
- Drop the experimental gate for WSLc on both the one-shot and
  state-aware surfaces.

TypeScript SDK
- Move `wslc` out of `ContainerConfig.experimental` and off
  `ExperimentalBackends`; add `BACKEND_SECTION_ROOT`, the TS twin of the
  Rust `SectionRoot`, so envelopes are built at the right root.
- Add a `wslcAvailable` probe fact end to end (Rust probe -> engine ->
  `wxc-exec --probe` -> SDK). Without it, removing the experimental gate
  unmasked the fact that `wslc` was never in `availableMethods`, which
  would have made the backend unreachable through the SDK.

Rust SDK, corpus, harnesses and docs
- Drop the `set_experimental(true)` requirement from `mxc-sdk`.
- Hoist `experimental.wslc` to top-level `wslc` in 31 test configs.
- Remove `--experimental` from the WSLc test harnesses.
- Update the WSLc docs, schema reference, SDK READMEs, setup script and
  `.github/copilot-instructions.md`.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9f02fa89-c89e-4a5d-b80d-5130252d3654
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant