Repository navigation
[Seatbelt] Remove the spawn-open launch method and replace probe with system-lib function check - #1511
Conversation
…function exists in the system library
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟡 Changes recommended
The symbol lookup can incorrectly report Seatbelt as unavailable when Node loads the native library with local visibility.
1 open finding
What changed in this PR
Removes the retired Seatbelt launch path and updates macOS availability detection to check sandbox_init, addressing #1510.
Changes:
- Removes
spawn_open, its configuration fields, helpers, and obsolete tests. - Shares native Seatbelt discovery with the Node SDK.
- Updates documentation and adds macOS platform-support tests.
| File | Description |
|---|---|
| src/mxc-sdk/tests/wxc_e2e_tests_e2e_seatbelt_characterization.rs | Updates test commentary. |
| src/mxc-sdk/src/core/mxc_engine/probe.rs | Uses symbol-based detection. |
| src/mxc-sdk/src/core/mxc_engine/platform.rs | Updates availability check and diagnostic. |
| src/mxc-sdk/src/core/mxc_common/wire.rs | Removes launch-method field and enum. |
| src/mxc-sdk/src/core/mxc_common/models.rs | Removes legacy launch configuration. |
| src/mxc-sdk/src/core/mxc_common/config_parser.rs | Removes launch-method mapping. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/v1_0/one_shot.rs | Removes obsolete field initialization. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/v1_0/one_shot_tests/stable_candidate.rs | Removes obsolete assertions. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/v0_9/one_shot.rs | Removes obsolete field initialization. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/v0_9/one_shot_tests/stable_candidate.rs | Removes obsolete assertions. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/dev/one_shot.rs | Removes obsolete field initialization. |
| src/mxc-sdk/src/core/mxc_common/config_contract_adapters/dev/one_shot_tests/stable_candidate.rs | Removes obsolete assertions. |
| src/mxc-sdk/src/backends/seatbelt/common/seatbelt_runner.rs | Deletes LaunchServices execution; adds symbol probe. |
| src/mxc-sdk/src/backends/seatbelt/common/profile_builder.rs | Clarifies profile documentation. |
| src/mxc-sdk/src/backends/seatbelt/common/mod.rs | Corrects backend documentation. |
| src/mxc-sdk/README.md | Removes legacy PTY restriction text. |
| sdk/node/tests/unit/platform.test.ts | Adds macOS discovery projection tests. |
| sdk/node/src/v1/platform.ts | Uses native discovery on macOS. |
| sdk/node/src/v1/container.ts | Corrects profile application commentary. |
| sdk/node/README.md | Removes legacy PTY restriction text. |
| sdk/dotnet/README.md | Removes legacy PTY restriction text. |
| docs/development/plans/backend-support-probe-api.md | Documents revised macOS discovery. |
| docs/backends/seatbelt/seatbelt-backend.md | Removes retired launch-path documentation. |
| docs/api-reference/rust/v1/api.md | Updates PTY restrictions. |
| docs/api-reference/node/v1/api.md | Updates PTY restrictions. |
| docs/api-reference/dotnet/v1/api.md | Updates PTY restrictions. |
| .github/workflows/Build.MacOS.Job.yml | Updates test prerequisite commentary. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟢 Approval recommended
The scoped cleanup preserves supported execution behavior, and the revised discovery includes success and failure coverage with no blocking issues identified.
0 open findings
1 resolved since last review
🧠 Review effort: Balanced
| PlatformSupport { | ||
| reason: Some( | ||
| "/usr/bin/sandbox-exec not found; macOS install is incomplete".to_string(), | ||
| "sandbox_init is unavailable; macOS install is incomplete".to_string(), |
There was a problem hiding this comment.
thought: thinking about all the updated error messages in this PR that reference "sandbox_init" I'm thinking we should make it more consumer friendly. Something like "Seatbelt support through MXC is unavailable" or something a long those lines. Thoughts?
There was a problem hiding this comment.
Will update it to say "Seatbelt could not be found on this installation of macOS. Your macOS install might be incomplete. (sandbox_init not found)"
| /// given permissions mode. Uses `O_CREAT | O_EXCL` (create_new) to avoid | ||
| /// symlink-following and collisions, and sets permissions immediately after | ||
| /// creation on the open file descriptor to close the TOCTOU window. | ||
| fn write_secure_temp_file( |
There was a problem hiding this comment.
question: Was this code for the launch method stuff only?
| support.reason = 'Seatbelt could not be found on this installation of macOS. Your macOS install might be incomplete. (sandbox_init not found)'; | ||
| } |
There was a problem hiding this comment.
note: we'll have to see how we can get this error message from the ffi directly so we don't have to add it in all the sdks. Do note though that I don't see an update to the .NET sdk for this. Was it already there?

📖 Description
The
spawn-openlaunch method was removed in schema version 0.9. The code is currently unreachable. In addition, the probe for bothspawn-execandspawn-openchecked for a file (/usr/bin/sandbox-exec) that only validatesspawn-openwould work.This PR removes all code and documentation mentioning
spawn-open, and replaces the probe with a check for thesandbox_initfunction symbol's existence in shared system libraries. This probe function is referenced by both Rust and Node.New probe:
🔗 References
Resolves #1510
🔍 Validation
Lint, clippy, and full validation suite passed locally.
✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see pull request builds)📋 Issue Type
Microsoft Reviewers: Open in CodeFlow