Skip to content

Add 0.7 configuration contract and adapter - #838

Merged
Branden Bonaby (bbonaby) merged 1 commit into
mainfrom
user/gudge/version_specific_config_parsers_phase4
Aug 14, 2026
Merged

Add 0.7 configuration contract and adapter#838
Branden Bonaby (bbonaby) merged 1 commit into
mainfrom
user/gudge/version_specific_config_parsers_phase4

Conversation

@MGudgin

@MGudgin Gudge (MGudgin) commented Aug 13, 2026

Copy link
Copy Markdown
Member

This PR adds the exact published 0.7.0-alpha contract and its adapter to the current wxc_common wire model.

Details

  • Adds recursively closed 0.7 request types for annotations and the stable Seatbelt surface.
  • Preserves AppContainer and macOS Sandbox compatibility aliases while enforcing string-only enum representations in both published contracts.
  • Adds exhaustive adapter mappings, version-boundary coverage, fixtures, and current-wire equivalence tests.

Tests

  • cargo fmt --all -- --check
  • cargo check -p mxc_config_contract -p wxc_common
  • cargo clippy -p mxc_config_contract --all-targets -- -D warnings
  • cargo clippy -p wxc_common --all-targets -- -D warnings
  • cargo test -p mxc_config_contract --no-fail-fast (175 tests passed)
  • cargo test -p wxc_common (628 tests passed)
Microsoft Reviewers: Open in CodeFlow

@MGudgin
Gudge (MGudgin) requested a review from a team as a code owner August 13, 2026 18:33
@azure-pipelines

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

Gudge (MGudgin) pushed a commit that referenced this pull request Aug 13, 2026
This PR updates the version-specific parser plan with the Phase 4 review status.

Details

* Records PR #838 as the stacked Phase 4 contract and adapter change under review.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: da2ef4f8-31d6-4979-bd6b-fb822b25b694
Base automatically changed from user/gudge/version_specific_config_parsers_phase3 to main August 13, 2026 18:34
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/version_specific_config_parsers_phase4 branch from ba3a6ff to 3512575 Compare August 13, 2026 18:34
Comment thread src/core/mxc_config_contract/src/published/v0_6_0_alpha/mod.rs
Comment thread src/core/mxc_config_contract/src/published/v0_7_0_alpha/mod.rs
Copilot AI balanced review requested due to automatic review settings August 14, 2026 16:36
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/version_specific_config_parsers_phase4 branch from 3512575 to e332a1b Compare August 14, 2026 16:36

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 published 0.7.0-alpha configuration contract, adapter, compatibility aliases, and comprehensive validation coverage.

Changes:

  • Introduces closed 0.7 contract types and wire-model conversion.
  • Adds Seatbelt, annotation, alias, enum, fixture, and version-boundary tests.
  • Tightens 0.6 enum decoding to string-only representations.
Show a summary per file
File Description
src/core/wxc_common/src/config_contract_adapters/v0_7.rs Adds the 0.7 wire adapter and equivalence tests.
src/core/wxc_common/src/config_contract_adapters/v0_6.rs Renames AppContainer alias tests.
src/core/wxc_common/src/config_contract_adapters/mod.rs Registers the 0.7 adapter module.
src/core/mxc_config_contract/tests/version_boundaries/seatbelt.rs Tests Seatbelt’s 0.7 introduction.
src/core/mxc_config_contract/tests/version_boundaries/compatibility.rs Tests retained AppContainer aliases.
src/core/mxc_config_contract/tests/version_boundaries/common.rs Adds boundary-test helpers.
src/core/mxc_config_contract/tests/version_boundaries/annotations.rs Tests 0.7 annotation availability.
src/core/mxc_config_contract/tests/version_boundaries.rs Registers boundary test modules.
src/core/mxc_config_contract/tests/v0_7_0_alpha/seatbelt.rs Tests the Seatbelt contract.
src/core/mxc_config_contract/tests/v0_7_0_alpha/root.rs Tests root structure and required fields.
src/core/mxc_config_contract/tests/v0_7_0_alpha/optional_fields.rs Tests optional-field behavior.
src/core/mxc_config_contract/tests/v0_7_0_alpha/network.rs Tests proxy constraints.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/valid/seatbelt_minimal.json Adds a minimal Seatbelt fixture.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/valid/seatbelt_complete.json Adds a complete Seatbelt fixture.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/valid/proxy_url.json Adds a URL proxy fixture.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/valid/proxy_localhost.json Adds a localhost proxy fixture.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/valid/proxy_builtin.json Adds a built-in proxy fixture.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/valid/minimal.json Adds a minimal 0.7 fixture.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/valid/macos_sandbox_alias.json Covers the macOS alias.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/valid/empty_optional_objects.json Covers empty optional objects.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/valid/complete.json Adds a complete 0.7 fixture.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/valid/app_container_alias.json Covers the AppContainer alias.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/valid/annotations.json Covers schema and comment annotations.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/invalid/unknown_root_field.json Covers unknown root fields.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/invalid/unknown_nested_field.json Covers unknown nested fields.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/invalid/state_aware.json Covers unsupported state-aware fields.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/invalid/seatbelt_unknown_field.json Covers unknown Seatbelt fields.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/invalid/seatbelt_invalid_launch_method.json Covers invalid launch methods.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/invalid/incomplete_lxc.json Covers incomplete LXC configuration.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/invalid/experimental.json Covers experimental-field rejection.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/invalid/experimental_seatbelt_moved.json Intended to cover promoted Seatbelt rejection.
src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures.rs Registers fixture validation tests.
src/core/mxc_config_contract/tests/v0_7_0_alpha/enums.rs Tests enum representations and aliases.
src/core/mxc_config_contract/tests/v0_7_0_alpha/common.rs Adds shared test assertions.
src/core/mxc_config_contract/tests/v0_7_0_alpha/annotations.rs Tests annotation values and constraints.
src/core/mxc_config_contract/tests/v0_7_0_alpha.rs Registers 0.7 test modules.
src/core/mxc_config_contract/tests/v0_6_0_alpha/root.rs Clarifies existing test names.
src/core/mxc_config_contract/tests/v0_6_0_alpha/optional_fields.rs Clarifies optional-field test names.
src/core/mxc_config_contract/tests/v0_6_0_alpha/enums.rs Enables string-only enum tests.
src/core/mxc_config_contract/src/published/v0_7_0_alpha/request.rs Defines the 0.7 request contract.
src/core/mxc_config_contract/src/published/v0_7_0_alpha/primitives.rs Defines 0.7 validation primitives.
src/core/mxc_config_contract/src/published/v0_7_0_alpha/network.rs Defines 0.7 network types.
src/core/mxc_config_contract/src/published/v0_7_0_alpha/mod.rs Exports 0.7 types and enum macro.
src/core/mxc_config_contract/src/published/v0_6_0_alpha/request.rs Applies string-only enum decoding.
src/core/mxc_config_contract/src/published/v0_6_0_alpha/primitives.rs Changes constructor visibility.
src/core/mxc_config_contract/src/published/v0_6_0_alpha/network.rs Applies string-only network enums.
src/core/mxc_config_contract/src/published/v0_6_0_alpha/mod.rs Adds the string-enum macro.
src/core/mxc_config_contract/src/published/mod.rs Exports the 0.7 contract.

Review details

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

Suppressed comments (1)

src/core/mxc_config_contract/src/published/v0_7_0_alpha/request.rs:215

  • The newly public annotation fields also lack rustdoc, unlike the rest of Request. Document that these fields carry the optional schema reference and ignored annotation value so consumers of the published contract understand their purpose.
    #[serde(rename = "$schema", default)]
    pub schema: OptionalField<String>,
    #[serde(rename = "_comment", default)]
    pub comment: OptionalField<serde_json::Value>,
  • Files reviewed: 48/48 changed files
  • Comments generated: 4
  • Review effort level: Balanced

Comment thread src/core/mxc_config_contract/src/published/v0_7_0_alpha/request.rs Outdated
Comment thread src/core/mxc_config_contract/src/published/v0_7_0_alpha/request.rs Outdated

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 (2)

src/core/mxc_config_contract/tests/v0_7_0_alpha/fixtures/invalid/experimental_seatbelt_moved.json:8

  • This fixture is identical to the generic experimental.json case and never contains the moved Seatbelt field named by the fixture. As a result, it does not verify that the former experimental.seatbelt shape is rejected; use a seatbelt payload here so this regression case exercises the intended boundary.
  "experimental": {
    "seatbelt": {}
  }

src/core/mxc_config_contract/src/published/v0_7_0_alpha/request.rs:254

  • Remove the duplicate period in this public API documentation.
    /// Optional macOS Seatbelt configuration.
  • Files reviewed: 48/48 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread src/core/mxc_config_contract/src/published/v0_7_0_alpha/request.rs
Copilot AI review requested due to automatic review settings August 14, 2026 16:45
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/version_specific_config_parsers_phase4 branch from 8faf88f to 4e8b86c Compare August 14, 2026 16:45

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

  • Files reviewed: 48/48 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Copilot AI review requested due to automatic review settings August 14, 2026 16: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.

Review details

  • Files reviewed: 48/48 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

This PR adds the exact published 0.7.0-alpha contract and its adapter to the
current wxc_common wire model.

Details

* Adds recursively closed 0.7 request types for annotations and the stable
  Seatbelt surface.
* Preserves AppContainer and macOS Sandbox compatibility aliases while
  enforcing string-only enum representations.
* Adds exhaustive adapter mappings, version-boundary coverage, fixtures, and
  current-wire equivalence tests.

Tests

* `cargo fmt --all -- --check`
* `cargo check -p mxc_config_contract -p wxc_common`
* `cargo clippy -p mxc_config_contract --all-targets -- -D warnings`
* `cargo clippy -p wxc_common --all-targets -- -D warnings`
* `cargo test -p mxc_config_contract --no-fail-fast`
* `cargo test -p wxc_common`

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: da2ef4f8-31d6-4979-bd6b-fb822b25b694
Copilot AI review requested due to automatic review settings August 14, 2026 16:56
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/version_specific_config_parsers_phase4 branch from 4e8b86c to 4fc699c Compare August 14, 2026 16: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.

Review details

  • Files reviewed: 48/48 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@bbonaby
Branden Bonaby (bbonaby) merged commit 755996f into main Aug 14, 2026
23 checks passed
@bbonaby
Branden Bonaby (bbonaby) deleted the user/gudge/version_specific_config_parsers_phase4 branch August 14, 2026 18:40
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.

3 participants