Skip to content

Remove the binding request FFI exports - #1352

Open
Gudge (MGudgin) wants to merge 1 commit into
user/gudge/dotnet-json-ffifrom
user/gudge/remove-binding-json-ffi
Open

Gudge (MGudgin) wants to merge 1 commit into
user/gudge/dotnet-json-ffifrom
user/gudge/remove-binding-json-ffi

Conversation

@MGudgin

@MGudgin Gudge (MGudgin) commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

This PR removes the deprecated private binding-request FFI surface now that
Node and .NET call the exact JSON exports directly. The mxc_ffi crate keeps the
shared run result, output conversion, streaming handle, and lifecycle surfaces,
while deleting the old request parser, binding fixtures, stale docs, and codegen
inventory entries.

Details

  • Removed mxc_run_request, mxc_spawn_request, their helpers, and request.rs.
  • Retargeted retained FFI tests and ignored real-host smoke tests to
    mxc_run_json and mxc_spawn_json with exact 1.0.0 documents.
  • Deleted the binding-request goldens and updated tests/policy documentation to
    describe only SDK v1 goldens and state-aware exact fixtures.
  • Updated native C# binding codegen checks to require only JSON entry points.

Tests

  • cargo fmt --all -- --check; cargo check --workspace --all-targets
    --all-features; cargo clippy --workspace --all-targets --all-features --
    -D warnings.
  • cargo test -p mxc_ffi --all-features: 80 passed, 4 ignored, doc 0.
  • cargo test -p mxc_engine --all-features: 139 passed.
  • cargo test -p mxc-sdk --all-features: 55 passed, 5 ignored.
  • RUSTDOCFLAGS=-D warnings cargo doc -p mxc_ffi -p mxc-sdk --no-deps
    --all-features.
  • npm run build; npm test: 350 passed, 20 skipped; npm run typecheck.
  • dotnet test --solution Microsoft.Mxc.Sdk.slnx: 260 succeeded, 27 skipped.
  • node scripts/check-dotnet-bindings-codegen.js: 37 entry points.
  • node scripts/check-dotnet-api-parity.js: 7 one-shot backends, 8 discovery
    backends, 5 capabilities.
  • node scripts/check-dotnet-errorcode-parity.js: 17 codes.
  • node scripts/versioning/check-contract-codegen.js: 3 artifact sets.
  • node scripts/versioning/validate-configs.js: 414 configs, 15 exempt.
  • node scripts/versioning/check-tests-present.js: 7 test files.
  • git diff --check.
Microsoft Reviewers: Open in CodeFlow

@azure-pipelines

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

@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/remove-binding-json-ffi branch from fdcddc6 to bc408e4 Compare September 30, 2026 17:18
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/remove-binding-json-ffi branch 2 times, most recently from ad9d090 to 83eb247 Compare September 30, 2026 17:32
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/remove-binding-json-ffi branch from 83eb247 to 854923f Compare September 30, 2026 20:29
@MGudgin
Gudge (MGudgin) changed the base branch from user/gudge/rust_ffi_json_ingress to user/gudge/dotnet-json-ffi September 30, 2026 20:29
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/remove-binding-json-ffi branch from 854923f to 3adb269 Compare September 30, 2026 20:31
@MGudgin
Gudge (MGudgin) added this pull request to stack #1356 September 30, 2026 21:26
@MGudgin
Gudge (MGudgin) marked this pull request as ready for review September 30, 2026 21:27
@MGudgin
Gudge (MGudgin) requested a review from a team as a code owner September 30, 2026 21:27
Copilot AI balanced review requested due to automatic review settings September 30, 2026 21:27
@MGudgin
Gudge (MGudgin) requested a review from a team September 30, 2026 21:30
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/remove-binding-json-ffi branch from 3adb269 to c23d5aa Compare September 30, 2026 21:30

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

🟡 Changes recommended

Retargeted host tests now share the default container identity, risking cross-test policy and cleanup interference.

Review effort: Balanced
Findings: 2 Medium severity · 1 Low severity

Open (3)
What changed in this PR

Removes the deprecated private binding-request FFI after SDK migration to exact-version JSON ingress.

Changes:

  • Removes legacy request exports, parser, fixtures, and tests.
  • Retargets FFI tests and documentation to exact JSON APIs.
  • Updates C# binding checks for retained JSON entry points.
File Description
tests/​policy/​request-wslc.json Removes legacy WSLC fixture.
tests/​policy/​request-process-container.json Removes legacy ProcessContainer fixture.
tests/​policy/​request-directional-network.json Removes legacy networking fixture.
tests/​policy/​README.md Documents retained fixture families.
src/​ffi/​mxc_ffi/​tests/​ffi.rs Retargets FFI tests to exact JSON.
src/​ffi/​mxc_ffi/​src/​streaming.rs Removes legacy spawn export and updates tests/docs.
src/​ffi/​mxc_ffi/​src/​state_aware.rs Updates retained handle references.
src/​ffi/​mxc_ffi/​src/​request.rs Deletes private request parser.
src/​ffi/​mxc_ffi/​src/​lib.rs Removes legacy run export and parser wiring.
scripts/​check-dotnet-bindings-codegen.js Drops removed signatures from checks.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

serde_json::json!({
"policy": {},
"command": command
"version": "1.0.0",
"filesystem":{"readwritePaths":["C:\\Windows\\Temp"]}
},
"command":"cmd /c echo hello-ffi"
"version":"1.0.0",
///
/// # Safety
/// `handle` must be null or a live handle from [`mxc_spawn_request`].
/// `handle` must be null or a live handle from [`mxc_spawn_json`].
Copilot AI balanced review requested due to automatic review settings September 30, 2026 21:31

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

🔵 Needs a closer look

Unsafe handle documentation incorrectly excludes handles returned by the retained state-aware execution API.

Review effort: Balanced
Findings: 2 Medium severity · 1 Low severity

Open (3)

This PR removes the deprecated private binding-request FFI surface now that
Node and .NET call the exact JSON exports directly. The mxc_ffi crate keeps the
shared run result, output conversion, streaming handle, and lifecycle surfaces,
while deleting the old request parser, binding fixtures, stale docs, and codegen
inventory entries.

Details

* Removed mxc_run_request, mxc_spawn_request, their helpers, and request.rs.
* Retargeted retained FFI tests and ignored real-host smoke tests to
  mxc_run_json and mxc_spawn_json with exact 1.0.0 documents.
* Deleted the binding-request goldens and updated tests/policy documentation to
  describe only SDK v1 goldens and state-aware exact fixtures.
* Updated native C# binding codegen checks to require only JSON entry points.

Tests

* cargo fmt --all -- --check; cargo check --workspace --all-targets
  --all-features; cargo clippy --workspace --all-targets --all-features --
  -D warnings.
* cargo test -p mxc_ffi --all-features: 80 passed, 4 ignored, doc 0.
* cargo test -p mxc_engine --all-features: 139 passed.
* cargo test -p mxc-sdk --all-features: 55 passed, 5 ignored.
* RUSTDOCFLAGS=-D warnings cargo doc -p mxc_ffi -p mxc-sdk --no-deps
  --all-features.
* npm run build; npm test: 350 passed, 20 skipped; npm run typecheck.
* dotnet test --solution Microsoft.Mxc.Sdk.slnx: 260 succeeded, 27 skipped.
* node scripts/check-dotnet-bindings-codegen.js: 37 entry points.
* node scripts/check-dotnet-api-parity.js: 7 one-shot backends, 8 discovery
  backends, 5 capabilities.
* node scripts/check-dotnet-errorcode-parity.js: 17 codes.
* node scripts/versioning/check-contract-codegen.js: 3 artifact sets.
* node scripts/versioning/validate-configs.js: 414 configs, 15 exempt.
* node scripts/versioning/check-tests-present.js: 7 test files.
* git diff --check.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 33217f7b-dc7d-4da0-af5f-018fef64013c
Generated-with: gpt-5.5
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/remove-binding-json-ffi branch from c23d5aa to 1ee00e4 Compare September 30, 2026 21:40

This branch has not been deployed

No deployments
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.

2 participants