Skip to content

Add 0.8 one-shot configuration contract - #909

Merged
Gudge (MGudgin) merged 1 commit into
mainfrom
user/gudge/version_specific_config_parsers_phase5a
Aug 19, 2026
Merged

Add 0.8 one-shot configuration contract#909
Gudge (MGudgin) merged 1 commit into
mainfrom
user/gudge/version_specific_config_parsers_phase5a

Conversation

@MGudgin

@MGudgin Gudge (MGudgin) commented Aug 14, 2026

Copy link
Copy Markdown
Member

This PR adds the mutable 0.8.0-alpha one-shot configuration contract.

Details

  • Adds independently owned stable-candidate and recursively closed experimental wire types for the development contract.
  • Models development containment values, ProcessContainer denial capture, Windows Sandbox, WSLC, telemetry, and compatibility aliases.
  • Adds structural, fixture, compatibility, adjacent-version boundary, and strict rustdoc coverage while preserving the published contracts.

Tests

  • cargo fmt --all -- --check
  • cargo test -p mxc_config_contract (324 tests passed)
  • cargo clippy -p mxc_config_contract --all-targets -- -D warnings
  • $env:RUSTDOCFLAGS='-D missing-docs'; cargo doc -p mxc_config_contract --no-deps
  • git diff --check origin/main..HEAD
Microsoft Reviewers: Open in CodeFlow

Copilot AI balanced review requested due to automatic review settings August 14, 2026 20:50
@MGudgin
Gudge (MGudgin) requested a review from a team as a code owner August 14, 2026 20:50
@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.

Pull request overview

Adds the mutable, strict one-shot 0.8.0-alpha configuration contract and comprehensive compatibility/boundary tests.

Changes:

  • Introduces independently owned development wire types.
  • Models new containment, denial-capture, telemetry, Windows Sandbox, and WSLC fields.
  • Adds fixtures and version-boundary coverage.
Show a summary per file
File Description
src/core/mxc_config_contract/src/lib.rs Exposes the development contract.
src/core/mxc_config_contract/src/dev/mod.rs Defines and exports 0.8 contract modules.
src/core/mxc_config_contract/src/dev/primitives.rs Adds strict optional and string primitives.
src/core/mxc_config_contract/src/dev/stable.rs Models stable-candidate sections.
src/core/mxc_config_contract/src/dev/network.rs Models network and proxy settings.
src/core/mxc_config_contract/src/dev/one_shot.rs Defines the one-shot request contract.
src/core/mxc_config_contract/src/dev/experimental.rs Models closed experimental settings.
src/core/mxc_config_contract/tests/v0_8_0_alpha.rs Registers the 0.8 test suite.
src/core/mxc_config_contract/tests/v0_8_0_alpha/common.rs Adds shared assertion helpers.
src/core/mxc_config_contract/tests/v0_8_0_alpha/annotations.rs Tests annotation fields.
src/core/mxc_config_contract/tests/v0_8_0_alpha/enums.rs Tests enum values and aliases.
src/core/mxc_config_contract/tests/v0_8_0_alpha/experimental.rs Registers experimental tests.
src/core/mxc_config_contract/tests/v0_8_0_alpha/experimental/root.rs Tests experimental-section closure.
src/core/mxc_config_contract/tests/v0_8_0_alpha/experimental/test_and_telemetry.rs Tests test and telemetry fields.
src/core/mxc_config_contract/tests/v0_8_0_alpha/experimental/windows_sandbox.rs Tests Windows Sandbox compatibility fields.
src/core/mxc_config_contract/tests/v0_8_0_alpha/experimental/wslc.rs Tests WSLC settings and mappings.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures.rs Validates fixture collections.
src/core/mxc_config_contract/tests/v0_8_0_alpha/network.rs Tests proxy variants and constraints.
src/core/mxc_config_contract/tests/v0_8_0_alpha/one_shot.rs Tests root and one-shot behavior.
src/core/mxc_config_contract/tests/v0_8_0_alpha/optional_fields.rs Tests omission and null handling.
src/core/mxc_config_contract/tests/v0_8_0_alpha/seatbelt.rs Tests Seatbelt structure and aliases.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/valid/minimal.json Adds a minimal valid fixture.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/valid/complete.json Adds a comprehensive fixture.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/valid/annotations.json Adds an annotation fixture.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/valid/app_container_alias.json Covers the AppContainer alias.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/valid/empty_optional_objects.json Covers empty optional objects.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/valid/experimental.json Covers experimental configuration.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/valid/macos_sandbox_alias.json Covers the macOS alias.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/valid/proxy_builtin.json Covers built-in proxy configuration.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/valid/proxy_localhost.json Covers localhost proxy configuration.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/valid/proxy_url.json Covers URL proxy configuration.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/valid/seatbelt_complete.json Adds a complete Seatbelt fixture.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/valid/seatbelt_minimal.json Adds a minimal Seatbelt fixture.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/invalid/incomplete_lxc.json Covers incomplete LXC settings.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/invalid/seatbelt_invalid_launch_method.json Covers invalid Seatbelt launch values.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/invalid/seatbelt_unknown_field.json Covers unknown Seatbelt fields.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/invalid/state_aware.json Rejects state-aware requests.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/invalid/unknown_nested_field.json Rejects unknown nested fields.
src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/invalid/unknown_root_field.json Rejects unknown root fields.
src/core/mxc_config_contract/tests/version_boundaries.rs Registers new boundary suites.
src/core/mxc_config_contract/tests/version_boundaries/common.rs Adds adjacent-version helpers.
src/core/mxc_config_contract/tests/version_boundaries/annotations.rs Simplifies annotation boundaries.
src/core/mxc_config_contract/tests/version_boundaries/compatibility.rs Extends alias compatibility through 0.8.
src/core/mxc_config_contract/tests/version_boundaries/containment.rs Tests new containment values.
src/core/mxc_config_contract/tests/version_boundaries/experimental.rs Tests experimental introduction.
src/core/mxc_config_contract/tests/version_boundaries/process_container.rs Tests denial-capture introduction.
src/core/mxc_config_contract/tests/version_boundaries/seatbelt.rs Simplifies Seatbelt boundaries.
src/core/mxc_config_contract/tests/v0_6_0_alpha/root.rs Strengthens legacy experimental rejection.
src/core/mxc_config_contract/tests/v0_7_0_alpha/root.rs Strengthens legacy experimental rejection.

Review details

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

Suppressed comments (2)

src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/valid/annotations.json:4

  • The fixture is for the new 0.8 contract, but its annotation still identifies the copied 0.7 example. Update the purpose so consumers of this fixture are not told it demonstrates the previous contract.
    "purpose": "Demonstrate 0.7 authoring annotations"

src/core/mxc_config_contract/tests/v0_8_0_alpha/annotations.rs:65

  • This second valid annotation example also points to a stable 0.8 schema that does not exist. Reference the current development schema instead so the sample remains a usable $schema value.
        "$schema": "https://github.com/microsoft/mxc/blob/main/schemas/stable/mxc-config.schema.0.8.0-alpha.json",
  • Files reviewed: 49/49 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/valid/annotations.json Outdated
Comment thread src/core/mxc_config_contract/tests/v0_8_0_alpha/annotations.rs Outdated
This PR adds the mutable 0.8.0-alpha one-shot configuration contract.

Details

* Add independently owned stable and recursively closed experimental wire types
  for the development contract.
* Model 0.8 containment values, ProcessContainer denial capture, Windows
  Sandbox, WSLC, and telemetry syntax.
* Add comprehensive structural, fixture, compatibility, and adjacent-version
  boundary coverage while preserving the published contracts.

Tests

* `cargo fmt --all -- --check`
* `cargo test -p mxc_config_contract` (322 tests passed)
* `cargo clippy -p mxc_config_contract --all-targets -- -D warnings`

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 14, 2026 21:37
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/version_specific_config_parsers_phase5a branch from 4a49432 to e1c3d7f Compare August 14, 2026 21:37

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.

Review details

Suppressed comments (1)

src/core/mxc_config_contract/tests/v0_8_0_alpha/fixtures/valid/annotations.json:4

  • This 0.8 fixture still describes itself as demonstrating 0.7 annotations, which makes the fixture metadata misleading. Update the version in the purpose text to match the contract exercised by the file.
    "purpose": "Demonstrate 0.7 authoring annotations"
  • Files reviewed: 49/49 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Comment thread src/core/mxc_config_contract/src/dev/mod.rs
Comment thread src/core/mxc_config_contract/src/dev/experimental.rs
Comment thread src/core/mxc_config_contract/src/lib.rs
Comment thread src/core/mxc_config_contract/tests/v0_8_0_alpha/seatbelt.rs
Comment thread src/core/mxc_config_contract/tests/v0_8_0_alpha/enums.rs
@MGudgin
Gudge (MGudgin) merged commit 0f8e3a9 into main Aug 19, 2026
23 checks passed
@MGudgin
Gudge (MGudgin) deleted the user/gudge/version_specific_config_parsers_phase5a branch August 19, 2026 15:29
Gudge (MGudgin) pushed a commit that referenced this pull request Aug 19, 2026
This PR adds the Phase 5A review follow-up to the plan's stack record and
repoints Phase 6 at the new top of the stack.

Details

* Record PR #949 as part of stack #948 and note that #909 has merged.
* Base Phase 6 on #949 rather than #941, since #949 rewrites the
  `string_enum!` macros and enum declarations that Phase 6.1 and 6.2 edit.
* Point Phase 6.2's schema emission at the post-#949 macro, which already
  derives test coverage from the same value table.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6126ba9a-a004-486c-86b9-03d9e06db54b
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.

4 participants