Repository navigation
Document supported containment policy contracts - #1416
Gudge (MGudgin) wants to merge 1 commit into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new contract pages misstate cross-platform containment defaults, WSLC proxy requirements, and the abstract vm selection.
Review effort: Balanced
Findings: 3
Open (3)
What changed in this PR
Documents supported sandbox policy contracts and replaces retired policy references without runtime changes.
Changes:
- Adds contract documentation for 0.9, 1.0, and development 1.1.
- Removes retired 0.7/0.8 documentation.
- Updates SDK, backend, and test references.
| File | Description |
|---|---|
tests/scripts/run_lxc_network_no_network_test.sh |
Updates contract references. |
tests/scripts/lib/WinProcessContainer.Common.ps1 |
Updates networking reference. |
src/mxc-sdk/src/core/mxc_common/network_parser_ingress_default_tests.rs |
Updates test documentation. |
src/mxc-sdk/src/backends/bubblewrap/common/network_rules.rs |
Updates policy citation. |
sdk/node/README.md |
Links stable policy. |
sdk/dotnet/README.md |
Links stable policy. |
README.md |
Links policy index. |
docs/seatbelt/seatbelt-backend.md |
Updates policy guidance. |
docs/schema.md |
Introduces versioned policy documentation. |
docs/sandbox-policy/README.md |
Adds supported-contract index. |
docs/sandbox-policy/1.1.0/policy.md |
Documents development contract. |
docs/sandbox-policy/1.0.0/policy.md |
Documents stable contract. |
docs/sandbox-policy/0.9.0/policy.md |
Documents minimum supported contract. |
docs/sandbox-policy/0.8.0/policy.md |
Removes retired policy. |
docs/sandbox-policy/0.8.0/networking/schema-updates.md |
Removes retired migration document. |
docs/sandbox-policy/0.8.0/networking/networking.md |
Removes retired networking design. |
docs/sandbox-policy/0.7.0/policy.md |
Removes retired policy. |
docs/process-container/os-version-support.md |
Updates stable-policy link. |
docs/process-container/networking.md |
Updates shared-policy references. |
docs/process-container/guide.md |
Updates prerequisites and legacy guidance. |
docs/process-container/examples/0.8.0-schema.md |
Redirects historical guidance. |
docs/examples.md |
Updates networking references. |
docs/authoring-a-new-feature.md |
Updates authoring references. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
c9fdfe7 to
88cd785
Compare
88cd785 to
3678ee5
Compare
3678ee5 to
f4fbf2d
Compare
f4fbf2d to
7e65507
Compare
7e65507 to
8318ad9
Compare
28fc82e to
9dd66cc
Compare
9dd66cc to
eea54a7
Compare
eea54a7 to
775fbdb
Compare
775fbdb to
de23857
Compare
de23857 to
5189e5d
Compare
This PR adds policy-first documentation for the published 0.9.0-alpha and 1.0.0 contracts and the V1 development contract. It explains how policy is authored through typed SDKs or MXC request JSON, what each backend can enforce, and how container lifecycle operations behave. Details * Add versioned guides linked from repository and subsystem documentation. * Describe network, filesystem, and UI policy, backend-specific handling, and container lifecycle identity and recovery semantics. * Replace generic sandbox terms with container/workload in documentation and test diagnostics, preserving product names and API/wire identifiers. Tests * `cargo fmt --manifest-path src\Cargo.toml --all -- --check` passed. * `cargo check --manifest-path src\Cargo.toml --workspace --all-targets --quiet` passed. * `node -` parsed 15 TypeScript examples; `python -` checked JSON examples, Markdown links, and registered contract shapes. * `git diff --check origin/main...HEAD` passed. Backend runtime suites were not run (documentation and wording changes). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a30a59a8-e257-4e4b-9995-762f3611dabe Generated-with: gpt-6-sol
5189e5d to
f17ea42
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
4 open findings
This wire-contract interface omitswslc.provision.portMappings, but later text in the same… · New This paragraph claims WSLC port mappings are 'illustrated here', but the nearby TypeScript… · New Within this document, the typed SDK identifier is consistently calledContainerId, but the… · New This sentence appears to have lost its punctuation when the trailing;was removed from the… · New
3 resolved since last review
🧠 Review effort: Lite
| interface ProvisionStateAwareRequest { | ||
| phase: 'provision'; // discriminator | ||
| version: '1.0.0'; | ||
| containment: StateAwareContainmentBackend; | ||
| containment: LifecycleContainmentKind; | ||
| filesystem?: FilesystemConfig; // backend declares per-phase honor | ||
| network?: NetworkConfig; // backend declares per-phase honor | ||
| ui?: UiConfig; // backend declares per-phase honor | ||
| isolationSession?: { | ||
| provision?: { appId?: string }; | ||
| }; | ||
| wslc?: { | ||
| provision?: { image?: string; imageTarPath?: string; portMappings?: PortMapping[] }; | ||
| provision?: { image?: string; imageTarPath?: string }; | ||
| }; | ||
| } |
| Backend-specific configuration uses each backend's permanent top-level JSON | ||
| section. The SDK builds these sections internally from the per-(backend, phase) | ||
| Configs defined in §6.1: | ||
| section. The SDK maps its per-(backend, phase) Configs to the published | ||
| fields; raw `1.1.0-alpha` JSON also accepts the WSLC port mappings illustrated | ||
| here: |
| All types above are in `Microsoft.Mxc.Sdk.V1`. See the | ||
| [networking guide](https://github.com/microsoft/mxc/blob/main/docs/schema.md#directional-networking-supported-contracts); | ||
| [networking guide](https://github.com/microsoft/mxc/blob/main/docs/schema.md#directional-networking-supported-contracts) | ||
| for policy behavior and the | ||
| [SDK API reference](https://github.com/microsoft/mxc/blob/main/docs/api-reference/README.md) |
There was a problem hiding this comment.
🟡 Changes recommended
The lifecycle error table incorrectly assigns unsupported_containment to provision failures.
4 open findings
Align error classification for unsupported provision containment · New This paragraph claims WSLC port mappings are 'illustrated here', but the nearby TypeScript… This wire-contract interface omitswslc.provision.portMappings, but later text in the same… This sentence appears to have lost its punctuation when the trailing;was removed from the…
1 resolved since last review
🧠 Review effort: Balanced
| |---|---| | ||
| | `malformed_request` | Structural request error: malformed JSON, missing required field, unknown or phase-inappropriate field, recursively unknown backend-specific field, or invalid phase-specific shape | | ||
| | `unsupported_containment` | The backend named by `containment` (provision) or implied by a syntactically valid `sandboxId` prefix (non-provision) is not recognised in this build. The TypeScript SDK checks its closed prefix union before dispatch and instead throws `malformed_id`; the typed Rust SDK keeps ids opaque and therefore returns `unsupported_containment` from dispatch, matching raw FFI requests. See §6.4. | | ||
| | `unsupported_containment` | The backend named by `containment` (provision) or implied by a syntactically valid `sandboxId` prefix (non-provision) is unsupported by the selected API or build. The TypeScript SDK reports an unknown prefix as `malformed_id`, but reports the recognised experimental Windows Sandbox `wsb:` prefix as `unsupported_containment` on V1; typed Rust and raw FFI dispatch also use `unsupported_containment` for unrecognised prefixes. See §5. | |
|
Not converging |


This PR adds policy-first documentation for the published 0.9.0-alpha and
1.0.0 contracts and the V1 development contract. It explains how policy
is authored through typed SDKs or MXC request JSON, what each backend can
enforce, and how container lifecycle operations behave.
Details
and container lifecycle identity and recovery semantics.
and test diagnostics, preserving product names and API/wire identifiers.
Tests
cargo fmt --manifest-path src\Cargo.toml --all -- --checkpassed.cargo check --manifest-path src\Cargo.toml --workspace --all-targets --quietpassed.node -parsed 15 TypeScript examples;python -checked JSON examples,Markdown links, and registered contract shapes.
git diff --check origin/main...HEADpassed. Backend runtime suites werenot run (documentation and wording changes).
Microsoft Reviewers: Open in CodeFlow