[WSLC] Harden exact contract infrastructure - #1189
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
This PR updates the version-aware execution plans with the finalized non-WSLC stack and the remaining WSLC-inclusive rebuild work. Details * Record the final #1184 through #1186 tips, topology, validation, and review status. * Document the #1187 through #1189 base and topology problems and the required one-commit restack sequence. * List the semantic and code-generation fixes that must be ported while preserving stable v0.9 WSLC behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 075defa1-7450-47ec-a6d8-953c69d509ee Generated-with: gpt-5.6-sol
1d76e9c to
b754171
Compare
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The registry, parser, tests, scripts, and documentation remain consistent with no unresolved correctness issues found.
Review effort: Balanced
Findings: None
What changed in this PR
Hardens exact-contract generation, parsing, and conformance testing while preserving published v0.9 WSLC request roots.
Changes:
- Makes normalization DTOs private and non-deserializable.
- Centralizes artifact/request-root metadata in the contract registry.
- Shares v0.9/v0.10 conformance suites and strengthens registry-driven validation.
| File | Description |
|---|---|
src/tools/mxc_schema_gen/src/main.rs |
Emits and validates registry metadata. |
src/core/wxc_common/src/wire.rs |
Internalizes normalization DTOs and backend-name parsing. |
src/core/wxc_common/src/splice.rs |
Uses explicit containment-name parsing. |
src/core/wxc_common/src/models.rs |
Updates containment normalization documentation. |
src/core/wxc_common/src/lib.rs |
Makes wire crate-private. |
src/core/wxc_common/src/config_contract_adapters/v0_9/state_aware_tests/common.rs |
Constructs DTO defaults directly. |
src/core/wxc_common/src/config_contract_adapters/dev/state_aware_tests/common.rs |
Constructs DTO defaults directly. |
src/core/mxc_engine/src/probe.rs |
Validates canonical backend names. |
src/core/mxc_engine/src/policy.rs |
Tests emitted JSON against the exact contract. |
src/core/mxc_engine/src/platform.rs |
Uses canonical runtime backend names. |
src/core/mxc_config_contract/tests/v0_9_0_alpha/state_aware/common.rs |
Re-exports v0.9 request types. |
src/core/mxc_config_contract/tests/v0_9_0_alpha/state_aware.rs |
Uses shared lifecycle tests. |
src/core/mxc_config_contract/tests/v0_9_0_alpha/common.rs |
Exposes the v0.9 one-shot type to shared tests. |
src/core/mxc_config_contract/tests/v0_9_0_alpha.rs |
Configures shared v0.9 suites. |
src/core/mxc_config_contract/tests/v0_10_0_alpha/state_aware/stop.rs |
Removes duplicated stop tests. |
src/core/mxc_config_contract/tests/v0_10_0_alpha/state_aware/start.rs |
Removes duplicated start tests. |
src/core/mxc_config_contract/tests/v0_10_0_alpha/state_aware/exec.rs |
Removes duplicated exec tests. |
src/core/mxc_config_contract/tests/v0_10_0_alpha/state_aware/deprovision.rs |
Removes duplicated deprovision tests. |
src/core/mxc_config_contract/tests/v0_10_0_alpha/state_aware/common.rs |
Re-exports development request types. |
src/core/mxc_config_contract/tests/v0_10_0_alpha/state_aware.rs |
Uses shared lifecycle tests. |
src/core/mxc_config_contract/tests/v0_10_0_alpha/one_shot.rs |
Removes duplicated one-shot tests. |
src/core/mxc_config_contract/tests/v0_10_0_alpha/common.rs |
Exposes the development one-shot type. |
src/core/mxc_config_contract/tests/v0_10_0_alpha/annotations.rs |
Removes duplicated annotation tests. |
src/core/mxc_config_contract/tests/v0_10_0_alpha.rs |
Configures shared v0.10 suites. |
src/core/mxc_config_contract/tests/support/state_aware/stop.rs |
Parameterizes shared stop tests. |
src/core/mxc_config_contract/tests/support/state_aware/start.rs |
Parameterizes shared start tests. |
src/core/mxc_config_contract/tests/support/state_aware/exec.rs |
Parameterizes shared exec tests. |
src/core/mxc_config_contract/tests/support/state_aware/deprovision.rs |
Parameterizes shared deprovision tests. |
src/core/mxc_config_contract/tests/support/one_shot.rs |
Parameterizes shared one-shot tests. |
src/core/mxc_config_contract/tests/support/exact.rs |
Adds version-aware test helpers. |
src/core/mxc_config_contract/tests/support/annotations.rs |
Parameterizes annotation tests. |
src/core/mxc_config_contract/src/registry.rs |
Adds artifact and request-root metadata. |
src/core/mxc_config_contract/src/lib.rs |
Exports request-root metadata. |
src/backends/isolation_session/common/src/state_aware.rs |
Removes obsolete wire deserialization test. |
scripts/versioning/tests/check-contract-codegen.test.js |
Tests registry-driven validation. |
scripts/versioning/check-schema-versions.js |
Checks canonical registry roots and renderability. |
scripts/versioning/check-contract-codegen.js |
Drives codegen and fixtures from registry metadata. |
docs/versioning.md |
Documents exact-contract authority and normalization. |
docs/schema-codegen.md |
Documents registry-owned codegen workflow. |
docs/backend-support-probe-api-plan.md |
Updates canonical backend-name source. |
docs/architecture.md |
Documents exact parsing and private normalization. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
b754171 to
c9b9351
Compare
c9b9351 to
5667b9a
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Repository contributor guidance still describes the rolling parser architecture that this change removes.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
5667b9a to
c4143ab
Compare
This PR hardens exact-contract infrastructure with focused cleanup that reduces duplicated conformance tests and makes registry-driven code-generation and backend-name checks fail closed while preserving published v0.9 WSLC roots. Details * Internalize normalization DTOs as non-deserializable implementation types. * Share v0.9 and v0.10 exact conformance suites. * Centralize artifact and request-root metadata in the Rust registry. * Keep WslcProvisionRequest registered in the published v0.9 contract. * Drive fixture diagnostics from registered roots and reject inconsistent renderability metadata without panicking. * Validate backend names through the parser and simplify probe checks. * Document exact-contract authority and the registry-owned contributor flow. Tests * `cargo fmt --all -- --check`, `cargo check --workspace --all-targets`, and all-feature workspace Clippy passed. * Workspace tests passed with `wxc_e2e_tests` excluded from the host-neutral run. * Node build, unit tests, and integration type-check passed on the unchanged parent Node tree. * All 82 versioning tests and exact codegen/parity/config gates passed; 363 repository configs validated against five registered exact schemas. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 075defa1-7450-47ec-a6d8-953c69d509ee Generated-with: gpt-5.6-sol
c4143ab to
794ef19
Compare
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The refactor consistently preserves exact-contract authority, validates registry metadata fail-closed, and retains coverage through shared version-specific suites.
Review effort: Balanced
Findings: None

📖 Description
Hardens exact-contract infrastructure with focused cleanup that reduces
duplicated conformance tests and makes registry-driven code-generation and
backend-name checks fail closed while preserving published v0.9 WSLC roots.
Details
WslcProvisionRequestregistered in the published v0.9 contract.renderability metadata without panicking.
Tests
cargo fmt --all -- --checkcargo check --workspace --all-targetscargo clippy --workspace --all-targets --all-features -- -D warningscargo test --workspace --exclude wxc_e2e_testsNode tree
Microsoft Reviewers: Open in CodeFlow