Repository navigation
Add exact contract publication tooling - #1150
Closed
Gudge (MGudgin) wants to merge 2 commits into
Closed
Gudge (MGudgin) wants to merge 2 commits into
Gudge (MGudgin) wants to merge 2 commits into
Conversation
This PR adds Phase 11a publication and freeze tooling for exact configuration contracts without changing the current v0.9 lifecycle state. Details * Keep the Rust ContractVersion and CONTRACTS registry authoritative, with a generated machine-readable JSON artifact for CI history comparisons. * Add a stable-candidate publication schema plus registry and publish commands to mxc_schema_gen. * Add schema digest, fixture, identity, and generated-artifact freeze checks to the versioning CI job. * Document the publication workflow and Rust source-of-truth boundary. Tests * cargo fmt --all -- --check * cargo test -p mxc_config_contract -p mxc_schema_gen * cargo test -p wxc_common -p mxc_engine * cargo clippy -p mxc_config_contract -p mxc_schema_gen --all-targets -- -D warnings * npm test in scripts/versioning * Contract codegen, freeze, schema-version, and config-validation gates Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4bc9ddda-3260-4e9f-8fc4-a16074d837dc Generated-with: gpt-5.6-sol
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
This PR updates Phase 11a so publication can select graduated state-aware roots without admitting experimental fields into a published contract. Details * Add a Rust-authored publication profile with an explicit one-shot selection and graduated state-aware backend list. * Project Windows Sandbox provision plus the shared lifecycle roots without an experimental member, while failing explicitly for IsolationSession and WSLC until their provision fields move to permanent locations. * Emit the selected publication profile in generated registry metadata and freeze it with published contract identities. * Keep the checked-in v0.9 profile conservative until backend graduation is decided in the pre-publication migration phase. Tests * cargo fmt --all -- --check * cargo test -p mxc_config_contract -p mxc_schema_gen * cargo test -p wxc_common -p mxc_engine * cargo clippy -p mxc_config_contract -p mxc_schema_gen --all-targets -- -D warnings * npm test in scripts/versioning * Contract codegen, freeze, schema-version, and config-validation gates Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4bc9ddda-3260-4e9f-8fc4-a16074d837dc Generated-with: gpt-5.6-sol
Gudge (MGudgin)
requested review from
a team
and
a balanced review from Copilot
September 14, 2026 03:20
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The freeze gate mishandles object-valued profiles and does not yet protect the required adapter and builder behavior.
Get a fresh assessment by requesting another Copilot review.
Review tier: Balanced
Findings: 2
Open findings (4)
What changed in this PR
Adds tooling to project, publish, and freeze exact configuration contracts without changing v0.9 lifecycle status.
Changes:
- Adds Rust-authored publication profiles and stable schema projections.
- Adds registry generation and publication CLI commands.
- Adds CI freeze validation, tests, generated metadata, and documentation.
| File | Description |
|---|---|
src/tools/mxc_schema_gen/tests/cli.rs |
Tests registry generation and publication. |
src/tools/mxc_schema_gen/src/main.rs |
Implements registry and publish commands. |
src/tools/mxc_schema_gen/Cargo.toml |
Adds SHA-256 support. |
src/core/mxc_config_contract/src/version.rs |
Makes contract versions hashable. |
src/core/mxc_config_contract/src/registry.rs |
Adds lifecycle and freeze metadata. |
src/core/mxc_config_contract/src/dev/schema.rs |
Generates publication-profile schemas. |
src/core/mxc_config_contract/src/dev/publication.rs |
Defines stable-candidate request projections. |
src/core/mxc_config_contract/src/dev/one_shot.rs |
Classifies containment variants. |
src/core/mxc_config_contract/src/dev/mod.rs |
Exports publication APIs. |
src/Cargo.lock |
Records the SHA-256 dependency. |
scripts/versioning/tests/check-contract-freeze.test.js |
Tests freeze validation helpers. |
scripts/versioning/package.json |
Exposes the freeze-check command. |
scripts/versioning/check-contract-freeze.js |
Implements merge-base freeze checks. |
schemas/contract-registry.generated.json |
Records generated contract metadata. |
docs/versioning.md |
Documents the publication workflow. |
docs/schema-codegen.md |
Documents registry and freeze tooling. |
.github/workflows/Versioning.Checks.Job.yml |
Runs freeze validation in CI. |
.github/copilot-instructions.md |
Records publication conventions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| errors.push(`published contract ${version} changed status to ${after.status}`); | ||
| } | ||
| for (const field of immutableIdentityFields) { | ||
| if (after[field] !== before[field]) { |
Comment on lines
+325
to
+326
| fn version_order(version: &str) -> Result<(u64, u64, u64), String> { | ||
| let core = version.split_once('-').map_or(version, |(core, _)| core); |
| const repoRoot = join(__dirname, "..", ".."); | ||
| const registryPath = join("schemas", "contract-registry.generated.json"); | ||
| const immutableIdentityFields = [ | ||
| "rustVariant", |
Comment on lines
+154
to
+160
| for (const field of [ | ||
| "schemaPath", | ||
| "contractModulePath", | ||
| "adapterPath", | ||
| "builderPath", | ||
| "fixturePath", | ||
| ]) { |
Member
Author
|
Abandoning. Going to take a different approach. |
An error occurred while trying to automatically change base from
user/gudge/version_specific_config_parsers_phase10b
to
main
September 15, 2026 13:57
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.


📖 Description
Adds Phase 11a publication and freeze tooling for exact configuration
contracts without changing the current v0.9 lifecycle state.
The Rust
ContractVersionandCONTRACTSregistry remains authoritative.The schema generator emits machine-readable registry metadata from Rust and
projects a Rust-authored publication profile. A profile can include the stable
one-shot root and graduated state-aware provision backends; selecting a
state-aware backend also includes the shared start, exec, stop, and deprovision
roots.
The checked-in v0.9 profile remains conservative until the pre-publication
migration removes the
experimentalblock and the backend graduation decisionis complete. Windows Sandbox can already be projected without an experimental
member. IsolationSession and WSLC selections fail explicitly until their
provision fields move to permanent locations, preventing silent field loss.
A merge-base-aware gate freezes published schema identities, profile metadata,
digests, and fixtures while permitting behavior-preserving Rust refactors.
🔗 References
Stacked on #1145.
The normative plan revision is commit
7bb0dbbaonuser/gudge/version_specific_config_parsers_plan.🔍 Validation
cargo fmt --all -- --checkcargo test -p mxc_config_contract -p mxc_schema_gencargo test -p wxc_common -p mxc_enginecargo clippy -p mxc_config_contract -p mxc_schema_gen --all-targets -- -D warningsnpm testfromscripts/versioning✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see docs/pull-requests.md)📋 Issue Type
GitHub Actions runs the PR validation build automatically. The ADO pipeline
(
MXC-PR-Build) is the Azure version of the PR pipeline, kept in parity withthe GitHub Actions build; it runs on merge to
main, and Microsoft reviewerswith write access can trigger it on a PR with
/azp run. Seedocs/pull-requests.md.
If the
dependency-feed-checkcheck fails on a new dependency, the crate mustbe added to the feed before the PR can pass. See
docs/pull-requests.md
for the steps.