Skip to content

Restore Rust SDK lifecycle mapper parity tests - #1379

Merged
Gudge (MGudgin) merged 2 commits into
mainfrom
user/gudge/sdk-lifecycle-mapper-parity
Oct 3, 2026
Merged

Gudge (MGudgin) merged 2 commits into
mainfrom
user/gudge/sdk-lifecycle-mapper-parity

Conversation

@MGudgin

@MGudgin Gudge (MGudgin) commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

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

  • Cover provision, start, stop, deprovision, and exec, including image tar
    paths, filesystems, directional networking, runtime proxy, environment
    ordering and explicit empty env, timeouts, and telemetry on/off.
  • Check exact-JSON source attribution separately from typed SDK inputs.

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

Copilot AI balanced review requested due to automatic review settings October 3, 2026 00:17
@MGudgin
Gudge (MGudgin) requested a review from a team as a code owner October 3, 2026 00:17
@azure-pipelines

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

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.

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.

Gudge and others added 2 commits October 2, 2026 17:21
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
Copilot AI balanced review requested due to automatic review settings October 3, 2026 00:27
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/sdk-lifecycle-mapper-parity branch from 94e7524 to 7376221 Compare October 3, 2026 00:27
@MGudgin
Gudge (MGudgin) changed the base branch from main to user/gudge/fix-linux-ffi-ci-filter October 3, 2026 00:27

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.

Copilot review overview

🟢 Approval recommended

The focused test additions correctly exercise SDK mapping parity without changing production behavior.

Review effort: Balanced
Findings: None

Base automatically changed from user/gudge/fix-linux-ffi-ci-filter to main October 3, 2026 00:46
@MGudgin
Gudge (MGudgin) merged commit 81936d3 into main Oct 3, 2026
31 checks passed
@MGudgin
Gudge (MGudgin) deleted the user/gudge/sdk-lifecycle-mapper-parity branch October 3, 2026 00:53
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