Restore Rust SDK lifecycle mapper parity tests - #1379
Merged
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused test additions correctly cover SDK mapping parity without changing production behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Restores Rust SDK lifecycle mapper parity coverage after SDK authoring moved to mxc-sdk.
Changes:
- Adds exact JSON parity tests for all lifecycle phases and mapper options.
- Clarifies engine test names as normalization-focused.
| File | Description |
|---|---|
src/core/mxc-sdk/src/state_aware_sdk.rs |
Adds comprehensive lifecycle mapper parity tests. |
src/core/mxc_engine/src/state_aware.rs |
Renames normalization tests for clarity. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This PR fixes the Linux x64 and arm64 dispatch gate after the exact-JSON FFI migration renamed its LXC routing test. The workflow still selected the removed test name, so the zero-test guard failed after #1353 merged. The rename originated in #1352. Details * Select the existing mxc_spawn_json LXC routing test in the Linux gate. * Document the pinned dispatch coverage and its zero-test failure behavior. Tests * Ubuntu 24.04 WSL: replayed the old selector and reproduced the zero-test guard failure; the corrected workflow step passed all four pinned checks (5 discovery, 1 dispatch, 1 FFI routing, and 10 SDK-helper tests). * cargo test --locked --release --target x86_64-unknown-linux-gnu -p mxc_ffi --test ffi: passed all 11 tests. * git diff --check: passed. Native ARM64 was not verified locally. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0c3a4f93-e784-41c7-9286-bdcefcb80465 Generated-with: gpt-6.1-sol
This PR exercises the Rust SDK's typed lifecycle authoring conversions against independently authored exact 1.0.0 JSON, closing the mapper coverage gap identified after the E0 authoring move. It keeps the engine's existing normalization comparisons clearly labeled as such. Details * Compare normalized execution intent and source attribution across typed and exact provision, start, stop, deprovision, and exec requests. * Cover WSLC images, filesystem, directional networking, proxy options, environment presence and order, timeouts, and telemetry options. * Name engine tests for their SdkStateAwareInput normalization boundary. Tests * cargo fmt --all -- --check: passed. * cargo check -p mxc-sdk -p mxc_engine --all-targets --all-features --quiet: passed. * cargo clippy -p mxc-sdk -p mxc_engine --all-targets --all-features --quiet -- -D warnings: passed. * cargo test -p mxc-sdk -p mxc_engine --all-features --quiet: passed; three new SDK parity tests passed. * cargo check -p mxc-sdk -p mxc_engine --tests --target x86_64-unknown-linux-gnu --quiet: passed. * cargo check -p mxc-sdk -p mxc_engine --tests --target x86_64-apple-darwin --quiet: passed. * node scripts/versioning/check-tests-present.js: 7 test files present. * git diff --check: passed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 30c4f940-9c8e-4d3e-89ff-b1776045bb1c Generated-with: gpt-6-sol
Gudge (MGudgin)
force-pushed
the
user/gudge/sdk-lifecycle-mapper-parity
branch
from
October 3, 2026 00:27
94e7524 to
7376221
Compare
Gudge (MGudgin)
changed the base branch from
main
to
user/gudge/fix-linux-ffi-ci-filter
October 3, 2026 00:27
Branden Bonaby (bbonaby)
approved these changes
Oct 3, 2026
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.
This PR restores SDK-owned lifecycle mapper parity coverage after #1353 moved
Rust authoring into mxc-sdk. Tests construct ProvisionRequest, ExecRequest,
SandboxId, and OperationOptions, then compare their normalized intent with
independently authored exact 1.0.0 JSON. Engine tests remain focused on
normalization of trusted intermediate input.
Details
paths, filesystems, directional networking, runtime proxy, environment
ordering and explicit empty env, timeouts, and telemetry on/off.
Tests
cargo fmt --all -- --check: passed.cargo check -p mxc-sdk -p mxc_engine --all-targets --all-features --quiet: passed.cargo clippy -p mxc-sdk -p mxc_engine --all-targets --all-features --quiet -- -D warnings: passed.cargo test -p mxc-sdk -p mxc_engine --all-features --quiet: passed; 3 new SDK parity tests passed.cargo check -p mxc-sdk -p mxc_engine --tests --target x86_64-unknown-linux-gnu --quiet: passed (compile-only).cargo check -p mxc-sdk -p mxc_engine --tests --target x86_64-apple-darwin --quiet: passed (compile-only).node scripts/versioning/check-tests-present.js: passed (7 test files).git diff --check: passed.Microsoft Reviewers: Open in CodeFlow