Phase 3a: decouple ProcessContainer backend selection from schema version#580
Open
MGudgin wants to merge 1 commit into
Conversation
…sion This PR decouples the Windows ProcessContainer AppContainer-vs-BaseContainer choice from the config's schema version, making it purely host-capability driven: BaseContainer is preferred when the OS supports it, AppContainer is the downlevel fallback. The schema `version` field no longer changes runtime backend selection, and `--experimental` no longer influences the AC/BC choice (it still gates other experimental backends/features). This is the foundation for Phase 3b (raising the schema floor and retiring 0.4.0/0.5.0). Details: - Executor binary (wxc/src/main.rs): route ProcessContainer unconditionally through `dispatch_with_fallback` (already capability-driven, prefer_bc=true); delete the version/experimental gate and the `else` plain-AppContainer arm. - SDK streaming (mxc-sdk/src/dispatch.rs): select the backend with a direct `fallback_detector::is_base_container_usable()` probe (the same probe the dispatcher's Tier 1 selection uses) instead of the version/experimental gate. This is a deliberate semantic shift: streaming on a non-BaseContainer host now gracefully uses AppContainer instead of fail-closing. - Delete `is_base_container_version` + `BASE_CONTAINER_MIN_VERSION` and their unit tests (wxc_common/src/config_parser.rs). - Reword now-stale hints/comments that told users to use schema '0.4.0-alpha' to fall back to AppContainer (base_container_runner.rs, launch_diagnostics.rs, appcontainer_runner.rs, models.rs ContainmentBackend doc, mxc-sdk policy.rs). - Reframe the mxc-sdk sandbox.rs integration tests that used the policy version to select the tier as backend-agnostic ProcessContainer regression guards. Behavior note: this only changes configs that previously took the plain- AppContainer path (schema < 0.5 without --experimental); every config that already satisfied `experimental || version >= 0.5` already routed through the capability-driven dispatcher and is unaffected. Those legacy configs are retired in Phase 3b. Tests: - cargo test -p wxc_common -p mxc-sdk (357 + mxc-sdk pass). - cargo clippy --workspace --all-targets -- -D warnings; cargo fmt --all -- --check. - check-schema-codegen.js and check-sdk-types-codegen.js both green (no wire change). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Generated-with: claude-opus-4.8
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.
.github/copilot-instructions.md.Summary
Phase 3a of the versioning remediation. It decouples the Windows ProcessContainer AppContainer-vs-BaseContainer choice from the config's schema
version, making backend selection purely host-capability driven: BaseContainer is preferred when the OS supports it, AppContainer is the downlevel fallback. The schema version no longer changes runtime backend selection, and--experimentalno longer influences the AC/BC choice (it still gates the other experimental backends/features). This is the foundation for Phase 3b (raising the schema floor and retiring0.4.0/0.5.0).Details
src/core/wxc/src/main.rs): routeProcessContainerunconditionally throughdispatch_with_fallback(already capability-driven,prefer_bc=true); delete the version/experimental gate and theelseplain-AppContainer arm.src/core/mxc-sdk/src/dispatch.rs): select the backend with a directfallback_detector::is_base_container_usable()probe — the same probe the dispatcher's Tier 1 selection uses, so the binary and streaming paths agree. Semantic shift (intentional): streaming on a non-BaseContainer host now gracefully uses AppContainer instead of fail-closing.is_base_container_version+BASE_CONTAINER_MIN_VERSIONand their unit tests (src/core/wxc_common/src/config_parser.rs).0.4.0-alphato fall back to AppContainer (base_container_runner.rs,launch_diagnostics.rs,appcontainer_runner.rs,models.rsContainmentBackenddoc,mxc-sdkpolicy.rs).mxc-sdksandbox.rsintegration tests that used the policy version to select the tier as backend-agnostic ProcessContainer regression guards.Behavior note: this only changes configs that previously took the plain-AppContainer path (schema
< 0.5without--experimental); every config that already satisfiedexperimental || version >= 0.5already routed through the capability-driven dispatcher and is unaffected. Those legacy configs are retired in Phase 3b.Tests
cargo test -p wxc_common -p mxc-sdk(357 + mxc-sdk pass).cargo clippy --workspace --all-targets -- -D warnings;cargo fmt --all -- --check.check-schema-codegen.jsandcheck-sdk-types-codegen.jsboth green (no wire change).Microsoft Reviewers: Open in CodeFlow