Remove the rolling configuration architecture - #1185
Gudge (MGudgin) wants to merge 1 commit into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
82f62e9 to
1954332
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The codegen gate can silently omit newly registered renderable contracts, and two documentation passages contradict the new validation architecture.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (3)
What changed in this PR
Replaces rolling whole-request configuration models with exact contract adapters and private normalization input.
Changes:
- Adds typed contract attribution and network compatibility semantics.
- Removes rolling schema/TypeScript generation and validation paths.
- Updates SDK conformance, tests, CI, and documentation.
| File | Description |
|---|---|
tests/policy/README.md |
Updates policy-document terminology. |
src/tools/mxc_schema_gen/tests/cli.rs |
Tests versioned schema generation. |
src/tools/mxc_schema_gen/src/main.rs |
Removes rolling generator targets. |
src/tools/mxc_schema_gen/Cargo.toml |
Removes rolling-model dependency. |
src/ffi/mxc_ffi/src/request.rs |
Uses exact versions for telemetry gating. |
src/ffi/mxc_ffi/Cargo.toml |
Removes semver. |
src/core/wxc/src/main.rs |
Logs typed source-contract attribution. |
src/core/wxc_common/src/state_aware_input.rs |
Normalizes through ConfigInput. |
src/core/wxc_common/src/policy_identity.rs |
Hashes typed contract compatibility. |
src/core/wxc_common/src/network_parser.rs |
Uses typed network compatibility. |
src/core/wxc_common/src/models.rs |
Adds attribution and compatibility models. |
src/core/wxc_common/src/lib.rs |
Exposes the revised internal architecture. |
src/core/wxc_common/src/config_input.rs |
Defines private normalization input. |
src/core/wxc_common/src/config_deserialize.rs |
Decouples tests from rolling models. |
src/core/wxc_common/src/config_contract_adapters/v0_9/state_aware.rs |
Produces v0.9 state-aware input. |
src/core/wxc_common/src/config_contract_adapters/v0_9/state_aware_tests/common.rs |
Updates state-aware adapter tests. |
src/core/wxc_common/src/config_contract_adapters/v0_9/one_shot.rs |
Produces v0.9 one-shot input. |
src/core/wxc_common/src/config_contract_adapters/v0_9/one_shot_tests/stable_candidate.rs |
Verifies v0.9 attribution. |
src/core/wxc_common/src/config_contract_adapters/v0_9/one_shot_tests/mod.rs |
Renames adapter test imports. |
src/core/wxc_common/src/config_contract_adapters/v0_9/one_shot_tests/common.rs |
Updates test adapter helper. |
src/core/wxc_common/src/config_contract_adapters/v0_9/mod.rs |
Introduces adapted config requests. |
src/core/wxc_common/src/config_contract_adapters/v0_9/common.rs |
Removes string-version conversion. |
src/core/wxc_common/src/config_contract_adapters/v0_8.rs |
Produces strict v0.8 input. |
src/core/wxc_common/src/config_contract_adapters/v0_7.rs |
Produces legacy-compatible v0.7 input. |
src/core/wxc_common/src/config_contract_adapters/v0_6.rs |
Produces legacy-compatible v0.6 input. |
src/core/wxc_common/src/config_contract_adapters/dev/state_aware.rs |
Produces development state-aware input. |
src/core/wxc_common/src/config_contract_adapters/dev/state_aware_tests/provision.rs |
Updates provision attribution tests. |
src/core/wxc_common/src/config_contract_adapters/dev/state_aware_tests/common.rs |
Updates development adapter tests. |
src/core/wxc_common/src/config_contract_adapters/dev/one_shot.rs |
Produces development one-shot input. |
src/core/wxc_common/src/config_contract_adapters/dev/one_shot_tests/stable_candidate.rs |
Verifies development attribution. |
src/core/wxc_common/src/config_contract_adapters/dev/one_shot_tests/mod.rs |
Renames adapter test imports. |
src/core/wxc_common/src/config_contract_adapters/dev/one_shot_tests/common.rs |
Updates test adapter helper. |
src/core/wxc_common/src/config_contract_adapters/dev/mod.rs |
Introduces development config requests. |
src/core/wxc_common/src/config_contract_adapters/dev/common.rs |
Removes string-version conversion. |
src/core/wxc_common/Cargo.toml |
Removes rolling schema dependencies. |
src/core/mxc-sdk/README.md |
Documents exact-contract construction. |
src/core/mxc_schema_support/src/ts_emit.rs |
Retires rolling TypeScript emission. |
src/core/mxc_schema_support/src/lib.rs |
Removes the rolling emitter API. |
src/core/mxc_engine/src/run.rs |
Attributes telemetry to external contracts. |
src/core/mxc_engine/src/policy/network.rs |
Selects formats using contract enums. |
src/core/mxc_engine/src/policy/exact/mod.rs |
Clears attribution for typed SDK requests. |
src/core/mxc_engine/src/policy.rs |
Removes rolling builders and tests exact output. |
src/core/mxc_engine/src/configs/process_container.rs |
Tests normalized exact requests. |
src/core/mxc_config_contract/tests/v0_9_0_alpha/fixtures.rs |
Shares exact fixture utilities. |
src/core/mxc_config_contract/tests/v0_9_0_alpha/common.rs |
Shares assertion utilities. |
src/core/mxc_config_contract/tests/v0_9_0_alpha.rs |
Registers shared test support. |
src/core/mxc_config_contract/tests/v0_10_0_alpha/fixtures.rs |
Shares exact fixture utilities. |
src/core/mxc_config_contract/tests/v0_10_0_alpha/common.rs |
Shares assertion utilities. |
src/core/mxc_config_contract/tests/v0_10_0_alpha.rs |
Registers shared test support. |
src/core/mxc_config_contract/tests/support/exact.rs |
Adds reusable exact-contract tests. |
src/Cargo.lock |
Removes obsolete dependencies. |
src/backends/process_container/common/src/base_container_runner.rs |
Replaces version strings in tests. |
src/backends/nanvix/runner/src/lib.rs |
Tests compatibility-independent behavior. |
src/backends/isolation_session/common/src/state_aware.rs |
Tests normalized runtime configuration. |
src/backends/bubblewrap/common/src/proxy_network.rs |
Uses typed compatibility in tests. |
src/backends/bubblewrap/common/src/bwrap_runner.rs |
Replaces schema checks with compatibility. |
src/backends/bubblewrap/common/Cargo.toml |
Removes semver. |
sdk/node/tests/unit/wire-conformance.test.ts |
Uses the exact v0.10 oracle. |
sdk/node/README.md |
Documents private exact normalization. |
scripts/versioning/validate-configs.js |
Selects schemas from the registry. |
scripts/versioning/tests/check-contract-codegen.test.js |
Extends registry validation tests. |
scripts/versioning/check-sdk-types-codegen.js |
Removes the rolling TypeScript gate. |
scripts/versioning/check-schema-versions.js |
Validates registry-based versions. |
scripts/versioning/check-schema-codegen.js |
Removes the rolling schema gate. |
scripts/versioning/check-contract-codegen.js |
Centralizes exact artifact validation. |
schemas/schema-version.json |
Removes rolling schema metadata. |
docs/wsl/wslc-state-aware.md |
Documents direct adapter conversion. |
docs/versioning.md |
Documents the exact-only architecture. |
docs/version-specific-parser-migration-inventory.md |
Updates migration status and evidence. |
docs/state-aware-lifecycle/mxc-state-aware-sandbox-api.md |
Documents ConfigInput normalization. |
docs/state-aware-lifecycle/mxc-state-aware-sandbox-api-overview.md |
Updates backend integration guidance. |
docs/schema-codegen.md |
Rewrites exact code-generation guidance. |
docs/nanvix-microvm/nanvix-integration-plan.md |
Updates NanVix parser architecture. |
docs/bwrap-support/bubblewrap-backend-plan.md |
Updates Bubblewrap schema guidance. |
docs/authoring-a-new-feature.md |
Updates exact-contract authoring workflow. |
.github/workflows/Versioning.Checks.Job.yml |
Removes rolling CI gates. |
.github/copilot-instructions.md |
Records exact-only repository conventions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
1954332 to
c47d04a
Compare
c47d04a to
7289e61
Compare
7289e61 to
3812504
Compare
d4a410d to
b22de87
Compare
b22de87 to
d70a4a2
Compare
d70a4a2 to
4973321
Compare
This PR replaces rolling whole-request models with exact-contract adapters and private normalization inputs. Runtime behavior uses typed source attribution and compatibility instead of parsing contract-version strings, while direct Rust SDK construction remains JSON-free. Details * Introduce private ConfigInput and remove rolling request deserialization. * Replace runtime version behavior with typed attribution and compatibility. * Remove rolling schema and TypeScript artifacts and their legacy gates. * Add shared exact test support and close code-generation gate opt-outs. * Keep the Rust SDK JSON-free through exact typed request construction. * Normalize root-level exact-request diagnostics without changing contract types. * Align feature authoring and promotion guidance with permanent exact-contract field locations. Tests * `cargo fmt --all -- --check`, `cargo check --workspace --all-targets`, and all-feature workspace Clippy passed. * Workspace unit tests and the MicroVM-enabled x64 E2E tests passed. * Node build, 434 unit tests, and integration type-check passed. * .NET tests passed: 322 succeeded and 27 host-dependent tests skipped. * All 81 versioning tests and exact codegen/parity/config gates passed. * The root diagnostic regression and full exact-contract crate tests passed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 075defa1-7450-47ec-a6d8-953c69d509ee Generated-with: gpt-5.6-sol
4973321 to
f307c10
Compare
| | `sdk/node/src/generated/v0_10_0_alpha/wire.ts` | **Generated exact artifact** — do not hand-edit | | ||
| | `src/core/wxc_common/src/models.rs` | Add `GpuIsolationConfig` struct, add field to `ExperimentalConfig` | | ||
| | `src/core/wxc_common/src/config_parser.rs` | Map the new wire field to the domain struct in `convert_wire_config` | | ||
| | `src/core/wxc_common/src/config_parser.rs` | Map the new config-input field to the domain struct in `convert_config_input` | |
There was a problem hiding this comment.
Addressed in #1188. Good catch. I replaced the undefined "domain struct" terminology with the concrete flow: the exact contract field is adapted through CommonRequestIR and normalized into models::GpuIsolationConfig on ExecutionRequest.
| every renderable exact contract. | ||
|
|
||
| ## Generating | ||
| `wxc_common::config_input::ConfigInput` is an internal normalization boundary. |
There was a problem hiding this comment.
Addressed in #1188. It replaces the former whole-request wire::MxcConfig normalization boundary, not the entire wire module. Reusable nested wire DTOs remain where adapters need a common structural representation. I clarified that distinction and renamed the intermediate type to CommonRequestIR.
| live sandboxes. | ||
|
|
||
| Exact adapters normalize registered JSON contracts into the private | ||
| `ConfigInput` representation and then into `ExecutionRequest`. |
There was a problem hiding this comment.
Exact adapters also convert a ConfigInput into an ExecutionRequest? why do 2 jobs?
There was a problem hiding this comment.
Addressed in #1188. No, the previous wording was misleading. Exact adapters perform only structural conversion into CommonRequestIR. normalize_common_request_ir alone performs shared defaults, validation, and semantic conversion into ExecutionRequest. The documentation now states the two stages explicitly.
|
|
||
| Exact adapters normalize registered JSON contracts into the private | ||
| `ConfigInput` representation and then into `ExecutionRequest`. | ||
| `ExecutionRequest.source_contract` records the originating registered contract |
There was a problem hiding this comment.
For #1188, I agree that backends must not infer behavior from source_contract. They currently do not; contract-specific semantics are converted into explicit runtime fields such as network_enforcement_compatibility. Moving the field to request.metadata.source_contract would discourage misuse but would not enforce the boundary, so I am leaving it unchanged in this stack. If we want hard isolation, a focused follow-up should keep provenance outside the backend-facing ExecutionRequest entirely.
| /// Whether this schema opts into rejecting network elements Bubblewrap cannot | ||
| /// honor. Pre-0.8 callers keep the warning, so existing configs still run. | ||
| /// Whether this request rejects network elements Bubblewrap cannot honor. | ||
| fn rejects_unhonorable_network(request: &ExecutionRequest) -> bool { |
There was a problem hiding this comment.
Addressed in #1188. Yes, both functions tested whether network_enforcement_compatibility was Strict. I replaced them with one neutral uses_strict_network_contract helper and updated all six routing and validation call sites so the decisions cannot drift apart.
| pub(crate) struct ConfigInput { | ||
| pub(crate) schema: Option<String>, | ||
| pub(crate) comment: Option<serde_json::Value>, | ||
| pub(crate) source_contract: ContractVersion, |
There was a problem hiding this comment.
For #1188, the intermediate representation is now CommonRequestIR; it is crate-private and is never exposed to backend crates. Its source_contract is consumed during normalization and retained only as runtime provenance for diagnostics and telemetry. A nested metadata field would not strengthen that boundary, so I have left it direct. Keeping provenance outside ExecutionRequest would be the stronger follow-up if we decide it is needed.
| use mxc_config_contract::ContractVersion; | ||
|
|
||
| #[derive(Debug, Clone)] | ||
| pub(crate) struct ConfigInput { |
There was a problem hiding this comment.
I'm fully de-boarded with this name.
"Config" isn't great because this has the exec things (commandline, etc). "Input" is possibly even more generic.
I think ConfigSoup would be better than this name.
How about,
- ConfigIntermediateRepresentation
- ConfigIR
- ConfigIntermediateLayer
Let's give this type something more jarring.
My vote: NormalRequestIR
There was a problem hiding this comment.
Addressed in #1188. I renamed the type to CommonRequestIR, the module to common_request_ir, adapter constructors to into_common_request_ir, and the semantic conversion function to normalize_common_request_ir. I chose "Common" rather than NormalRequestIR because the representation is shared by one-shot and state-aware requests; "normal" could imply one-shot only.
| - [ ] Exact development contract and adapter updated | ||
| - [ ] Exact generated schema and TypeScript oracle regenerated |
There was a problem hiding this comment.
note: just an fyi, i think if rolling doesn't exist anymore then "exact" probably loses it's meaning right? and then we can call it "development contract" for example.
There was a problem hiding this comment.
Addressed in #1188. Mostly agreed. I removed redundant phrases such as "exact development contract" where "development contract" or "next published contract" is sufficient. I retained "exact contract" where it distinguishes an exact registered version from range-based or rolling interpretation.
| Exact-contract dispatch resolves every recorded migration case through its | ||
| registered contract. Seven negative documents remain in the corpus because |
There was a problem hiding this comment.
note: I assume once all your PRs are checked in we'd remove this file right? Since there would be no "migration" and the version stuff we have in the repo would just be our version story itself from then on.
There was a problem hiding this comment.
Addressed in #1188. The migration inventory was transitional documentation and was no longer referenced after the architecture landed, so I deleted it. Commit history still preserves the migration record if it is needed later.
|
Closing in favour of #1188 |


📖 Description
Replaces rolling whole-request models with exact-contract adapters and private
normalization inputs. Runtime behavior uses typed source attribution and
compatibility instead of parsing contract-version strings, while direct Rust
SDK construction remains JSON-free.
Details
ConfigInputand remove rolling request deserialization.types.
field locations.
Tests
cargo fmt --all -- --checkcargo check --workspace --all-targetscargo clippy --workspace --all-targets --all-features -- -D warningscargo test --workspace --exclude wxc_e2e_teststest_microvm_E2E testsnpm run build,npm test, andnpm run typecheck:integrationMicrosoft Reviewers: Open in CodeFlow