Skip to content

Retire pre-v0.9 schema contracts and migrate configurations - #1382

Merged
Gudge (MGudgin) merged 21 commits into
mainfrom
user/gudge/remove-schema-0-6-to-0-8
Oct 5, 2026
Merged

Gudge (MGudgin) merged 21 commits into
mainfrom
user/gudge/remove-schema-0-6-to-0-8

Conversation

@MGudgin

@MGudgin Gudge (MGudgin) commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

This PR raises the executable raw-config floor to 0.9.0-alpha by
removing the v0.6-v0.8 exact contracts and migrating SDKs, fixtures,
tests, and documentation to supported versions and directional
network policy.

Details

  • Remove retired Rust contract modules, adapters, and compatibility tests.
  • Migrate executable fixtures and examples, preserving enforcement and
    fail-closed rejection tests for supported backends.
  • Align Rust, Node, and .NET SDK version surfaces and proxy guidance.
  • Remove the obsolete Node testing-feature option and restore LXC proxy
    credential-rejection coverage.

Tests

  • From src, cargo fmt --all -- --check, cargo check --workspace --all-targets --all-features --quiet, cargo clippy --workspace --all-targets --all-features --quiet -- -D warnings, and
    cargo test --workspace --quiet passed.
  • From sdk/node, npm run typecheck and npm test passed
    (442 passed, 20 skipped). From sdk/dotnet, dotnet test --solution Microsoft.Mxc.Sdk.slnx --no-restore --verbosity quiet passed
    (314 passed, 31 skipped).
  • node scripts/versioning/check-contract-codegen.js and
    node scripts/versioning/validate-configs.js passed (396 configs);
    three LXC proxy-rejection cases passed with a freshly built Linux CLI.
Microsoft Reviewers: Open in CodeFlow

@MGudgin
Gudge (MGudgin) requested review from a team and a balanced review from Copilot October 3, 2026 01:25
@MGudgin
Gudge (MGudgin) requested a review from a team as a code owner October 3, 2026 01:25
@azure-pipelines

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Multiple migrated fixtures are invalid under the 0.9 contract or no longer match their test harnesses, causing unit and host-dependent suites to fail.

Review effort: Balanced
Findings: 27 High severity · 2 Low severity

Open (29)

And 9 more that still need to be addressed.

What changed in this PR

Raises the exact raw-config support floor to 0.9.0-alpha, removes older Rust contracts, and migrates documentation, SDKs, examples, and test fixtures.

Changes:

  • Removes v0.6–v0.8 contracts, adapters, fixtures, and compatibility behavior.
  • Updates SDK version surfaces and documentation.
  • Migrates network configurations to directional policy and runtime proxy fields.
File group Description
schemas/​schema-version.json Raises minimum supported contract to 0.9.
src/​core/​mxc_config_contract/​** Removes retired contracts and updates boundary tests.
src/​core/​wxc_common/​** Removes legacy compatibility paths and parsing behavior.
src/​backends/​** Updates backend tests and environment/network compatibility handling.
src/​core/​mxc-sdk/​**, src/​ffi/​**, src/​tools/​** Updates SDK, FFI, and schema-generation version usage.
sdk/​node/​** Updates Node types, tests, documentation, and version checks.
sdk/​dotnet/​** Updates .NET version constants, tests, and documentation.
tests/​configs/​**, tests/​examples/​** Migrates repository configurations to 0.9 directional networking.
tests/​scripts/​**, tests/​regression_tests/​** Updates host and regression test versions.
README.md, docs/​** Documents the new support floor and migration guidance.
scripts/​versioning/​** Updates code-generation tests and validation exemptions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/playground-limitations.md Resolved
Comment thread docs/sandbox-policy/0.7.0/policy.md Resolved
Copilot AI balanced review requested due to automatic review settings October 3, 2026 01:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Several migrated tests and examples now fail parsing or can pass without exercising the behavior they claim to validate.

Review effort: Balanced
Findings: 13 High severity · 4 Medium severity · 3 Low severity

Open (20)
Resolved since last review (20)

Comment thread docs/sandbox-policy/0.8.0/policy.md Resolved
Copilot AI balanced review requested due to automatic review settings October 3, 2026 02:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Two migrated Bubblewrap fixtures contradict their existing test harnesses, proxy E2E coverage is silently disabled, and several SDK migration documents still recommend retired fields.

Review effort: Balanced
Findings: 10 High severity · 4 Low severity

Open (14)
Resolved since last review (12)

Comment thread docs/examples.md Resolved
Comment thread sdk/dotnet/README.md Resolved
Comment thread sdk/node/CHANGELOG.md Resolved
Comment thread tests/configs/hello_world_v090.json Resolved
Copilot AI balanced review requested due to automatic review settings October 3, 2026 02:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Two migrated ProcessContainer proxy examples are invalid, and canonical documentation still advertises retired contract behavior.

Review effort: Balanced
Findings: 8 High severity · 2 Medium severity · 2 Low severity

Open (12)
Resolved since last review (6)
Previously missed (1)

In code that hasn't changed since last review

Low severity Architecture docs still describe removed LegacyCompatible contracts

src/​core/​wxc_common/​src/​models.rs:1126

Removing LegacyCompatible leaves the architecture documentation stale: docs/versioning.md:227-233 still describes that variant and says Strict starts at v0.8. Nearby ExecutionRequest docs also still describe pre-v0.9 typed contracts that no longer exist. Update those descriptions to match the single supported compatibility behavior.

Comment thread schemas/schema-version.json Resolved
Copilot AI balanced review requested due to automatic review settings October 3, 2026 02:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Retired-field guidance remains in shipped examples and errors, and deleting the built-in proxy fixture leaves a registered E2E test silently exercising nothing.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)
Resolved since last review (12)
Previously missed (3)

In code that hasn't changed since last review

Low severity Update workload text to document supported egress rules

tests/​examples/​06_network_capabilities_only.json:11

After migrating this policy to directional egress, the workload text at line 6 still tells users to select enforcementMode: "firewall" or "both". Exact 0.9 rejects that retired field; update the example text to point to supported egress.allow/egress.deny CIDR and port rules.

Low severity Update workload text to describe the directional egress policy

tests/​examples/​19_mac_network_restricted.json:6

The workload text was not migrated with the policy: it still describes allowedHosts under defaultPolicy=block, while this file now uses directional egress.default=deny. This shipped example should explain the policy it actually contains (and refer to the supported proxy example without presenting retired field names as current authoring).

Low severity Replace retired defaultPolicy guidance with egress.default

tests/​examples/​22_mac_network_allow_all.json:6

The output still says “With defaultPolicy allow” even though this migrated example no longer contains that retired field. Change the note to name network.egress.default = allow, otherwise users copying the example receive contradictory guidance.

Comment thread schemas/schema-version.json Resolved
Comment thread src/core/mxc-sdk/README.md Resolved
Copilot AI balanced review requested due to automatic review settings October 3, 2026 02:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The Node API still exposes unusable retired network fields, documentation remains contradictory, and a Bubblewrap enforcement test can report false success.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Resolved since last review (2)
Previously missed (2)

In code that hasn't changed since last review

Medium severity Remove or validate legacy NetworkConfig fields

sdk/​node/​src/​types.ts:258

Keeping these members in the public NetworkConfig makes TypeScript accept configurations that every now-supported exact contract rejects. This is not only compile-time compatibility: resolveExecutableAndArgs still serializes the legacy fields, applyLinuxNetworkPolicy still recommends/mutates them, and the README says raw ContainerConfig can target historical contracts, although the new floor rejects all such versions. Remove/move the legacy shape or add explicit SDK validation and migrate the helper/docs/tests so callers cannot construct a guaranteed-invalid request.

Low severity Update versioning guide to remove retired contract references

schemas/​schema-version.json:3

The new support floor leaves the canonical versioning guide internally stale: docs/versioning.md:229-233 still describes the removed LegacyCompatible variant and v0.6-v0.8 adapters, and lines 318-323 still say those retired contracts have registry descriptors. Those statements now contradict ContractVersion/CONTRACTS and will mislead future contract work; update the guide as part of this migration.

Comment thread tests/scripts/run_bwrap_network_test.sh Resolved
Copilot AI balanced review requested due to automatic review settings October 3, 2026 02:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Several tests now reject valid 0.9 requests, retired-version coverage was collapsed, and SDK guidance still advertises unsupported legacy paths.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Resolved since last review (1)
Previously missed (5)

In code that hasn't changed since last review

Medium severity Retire unsupported Node built-in proxy configuration

sdk/​node/​tests/​unit/​sandbox.test.ts:500

The 0.9 exact contract accepts only network.egress/network.ingress; network.proxy.builtinTestServer is an unknown field. This unit test only inspects CLI arguments, so it now blesses a request that the native parser can never execute, leaving allowTestingFeatures and its public documentation as a dead feature. Retire the Node built-in-proxy surface/tests or replace them with a supported contract path.

Medium severity Replace obsolete 0.8 enumeratePaths boundary test

schemas/​schema-version.json:3

run_processcontainer_filesystem_enumerate_test.ps1:29-36,61-71 still treats a 0.8 request as a field-introduction boundary for enumeratePaths. With this floor, that request is rejected before its fields are decoded, so the check passes even if 0.9 stops accepting enumeratePaths; remove the obsolete phase or replace it with a supported-contract acceptance check.

Low severity Update .NET README for directional networking

sdk/​dotnet/​Microsoft.Mxc.Sdk/​SchemaVersions.cs:15

Raising the .NET raw-config floor makes sdk/dotnet/README.md:69-71 incorrect: it still directs users to legacy network members through raw historical contracts, but none of those contracts is accepted anymore. Update that public guidance to require migration to directional networking.

Low severity Update Node README for directional networking

sdk/​node/​CHANGELOG.md:13

This new support floor leaves sdk/node/README.md:89-99 telling callers to replay legacy network fields through raw ContainerConfig and an immutable historical contract. Those versions are now unsupported, so that documented path always fails version dispatch. Replace the guidance with the directional migration requirement.

Low severity Correct network fixture contract version headers

tests/​scripts/​run_base_container_network_tests.ps1:4

The script executes base_container_network_allow.json and base_container_network_deny.json unchanged, and both now declare 0.9.0-alpha, not 1.0.0. Correct the header so it identifies the contract actually under test.

Copilot AI balanced review requested due to automatic review settings October 3, 2026 02:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

One Seatbelt rejection example exercises the wrong validation layer, and several public migration guides still describe retired contracts as usable.

Review effort: Balanced
Findings: None

Resolved since last review (1)
Previously missed (4)

In code that hasn't changed since last review

Medium severity Use a valid CIDR to test Seatbelt rule rejection

tests/​examples/​23_mac_blocked_hosts_unsupported.json:16

This migrated example is rejected by the shared CIDR parser, not by Seatbelt's unsupported-rule validation: evil.example.com is not a CIDR. Consequently, the examples suite can pass without exercising the backend rejection this file is meant to document. Use a valid numeric CIDR so the request reaches Seatbelt validation.

Low severity Clarify legacy schema guidance after raising the version floor

docs/​bwrap-support/​bubblewrap-backend.md:14

The new disclaimer conflicts with operational guidance later in this same guide, which still says schema 0.7 is accepted, 0.8 legacy proxy requests are supported, and those paths are retained for existing callers. Those requests now fail at exact-version dispatch, so readers are still given unusable configurations. Rewrite or clearly fence the legacy sections as historical and provide supported 0.9+ directional examples throughout.

Low severity Update ProcessContainer networking guide for schema 0.9+

schemas/​schema-version.json:3

Raising the canonical floor leaves the ProcessContainer backend guide inconsistent with runtime behavior: docs/process-container/networking.md still presents schema 0.8 as current and says legacy proxy requests retain compatibility, although those versions are now rejected before backend selection. Update that canonical guide to describe supported 0.9+ contracts and mark the old selection behavior historical.

Low severity Correct migration guidance for rejected pre-v0.9 contracts

sdk/​node/​src/​types.ts:258

The type now correctly notes that supported contracts are directional-only, but the public Node README and mapper diagnostics still direct callers to raw historical contracts for these fields. Since every pre-v0.9 version is now rejected at dispatch, that documented migration path cannot work. Update those messages to say these members remain only for TypeScript source compatibility and must be migrated before execution.

Copilot AI balanced review requested due to automatic review settings October 3, 2026 03:07
Gudge and others added 3 commits October 5, 2026 09:29
This PR records the removal of Node's public testing-feature option and
updates Linux LXC integration diagnostics to match the supported v0.9
contract they actually send.

Details

* Document the removed allowTestingFeatures option and its retired built-in
  proxy wire form in the current Node changelog.
* Name the v0.9 contract in the LXC test, fixture id, and failure message;
  remove the unreachable pre-v0.9 network helper branch.

Tests

* From sdk/node, npm run typecheck:integration: passed. The root-only LXC
  integration test requires a configured Linux LXC host and was not run here.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7570a662-a429-46d2-aa24-47fae6655cc4
Generated-with: gpt-6-sol
This PR updates runnable examples to describe and exercise supported
network.egress policy instead of retired defaultPolicy and enforcementMode
fields. The old capabilities-only example is renamed for the posture it
actually declares.

Details

* Describe general outbound access with egress.default=allow and point
  granular policies to numeric CIDR/port allow rules.
* Keep the combined Seatbelt example and the directional ProcessContainer
  example consistent with their declared supported contracts.

Tests

* node scripts/versioning/validate-configs.js: 396 configs validated,
  including 14 intentionally invalid fixtures; check-tests-present passed.
* Parsed the three changed examples as JSON, checked embedded Python/Bash
  syntax, and dry-ran all exact requests: two passed validation; the macOS
  backend request reached host-specific validation on this Windows host.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7570a662-a429-46d2-aa24-47fae6655cc4
Generated-with: gpt-6-sol
This PR restores the credentialed LXC proxy rejection test against the
supported v0.9 contract. It keeps credential handling separate from general
proxy rejection and removes a stale reference to the retired proxy-reuse test.

Details

* Verify the credentialed fixture, fail-closed proxy rejection, and redacted
  diagnostics without launching an LXC workload.
* Run the focused test in the LXC suite and keep general proxy rejection
  checks free of duplicate credential handling.

Tests

* Ubuntu WSL: built the current lxc-exec and ran both proxy rejection scripts;
  all credential, loopback, and hostname cases passed.
* cargo fmt --all -- --check; cargo check --workspace --all-targets
  --all-features; cargo clippy --workspace --all-targets --all-features --
  -D warnings; cargo test --workspace: passed.
* npm test (441 passed), npm run typecheck, and dotnet test --solution
  Microsoft.Mxc.Sdk.slnx --no-restore (314 passed, 31 skipped): passed.
* Contract codegen, 396 schema fixture validations, and test-presence check:
  passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7570a662-a429-46d2-aa24-47fae6655cc4
Generated-with: gpt-6-sol
Copilot AI balanced review requested due to automatic review settings October 5, 2026 16:38
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/remove-schema-0-6-to-0-8 branch from c6b5471 to 987197b Compare October 5, 2026 16:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The LXC credential test currently fails before execution, the Node testing option remains declared, and immutable published Rust contract modules are removed.

Review effort: Balanced
Findings: 2 High severity · 1 Medium severity

Open (3)

Comment thread sdk/node/src/helper.ts Resolved
Comment thread docs/examples.md Resolved
Comment thread docs/examples.md Resolved

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

This PR removes the remaining unused Node testing-feature option and
simplifies supported-contract examples. It also distinguishes proxy endpoint
enforcement from verification of the process serving the proxy.

Details

* Remove the obsolete helper option and add a compile-time check that rejects
  it if reintroduced.
* Omit optional container IDs from simple examples and clarify the
  identity-less proxy deployment wording.

Tests

* npm run typecheck passed, including the packed integration build.
* npm test passed: 442 passed, 20 skipped, zero failed.
* Three edited examples validated against the exact 1.0.0 schema without
  containerId; git diff --check passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7570a662-a429-46d2-aa24-47fae6655cc4
Generated-with: gpt-6-sol

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The 305-file compatibility removal spans public contracts and platform-specific enforcement, with a remaining CI-documentation mismatch and host-dependent validation.

Review effort: Balanced
Findings: None

Resolved since last review (3)

@MGudgin Gudge (MGudgin) changed the title Retire pre-v0.9 schema contracts and migrate configs Retire pre-v0.9 schema contracts and migrate configurations Oct 5, 2026
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.

5 participants