Skip to content

Remove the unused Node subprocess spawn helper - #1547

Merged
Gudge (MGudgin) merged 1 commit into
mainfrom
user/gudge/remove_node_spawn_helper
Oct 22, 2026
Merged

Gudge (MGudgin) merged 1 commit into
mainfrom
user/gudge/remove_node_spawn_helper

Conversation

@MGudgin

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

Copy link
Copy Markdown
Member

This PR deletes sdk/node/src/helper.ts, the subprocess launch path behind the retired spawnSandboxFromConfig family. #1385 replaced that path with the in-process v1 APIs and #1479 removed its last importer. Since then nothing in the package has imported it, and the package exports map (., ./v1, ./package.json) never exposed it, so only its own unit tests still exercised it. Docs that still described spawnSandboxFromConfig or an SDK-level experimental option now describe the v1 behaviour.

Details

  • Delete helper.ts, the FileLogger it alone used, and internal-only v1 leftovers (ContainmentTypes, LegacyContainmentAliases, ExperimentalBackends, legacyConfigAliasUnsupportedReason, findSeatbeltExecutable). None is exported from @microsoft/mxc-sdk/v1.
  • Remove the resolveExecutableAndArgs and FileLogger unit tests and drop logger.test.js from test:unit.
  • Document that the published v1 SDKs never authorize experimental backends. Node v1 passes experimental = false to the native entry points, the .NET switch is private, and Node v1 rejects microvm. So MicroVM and other experimental features run through wxc-exec --experimental (versioning.md, nanvix.md, the authoring guide, container-lifecycle.md §7.2).
  • Point the IsolationSession one-shot note at the Node v1 create-and-run operations and drop removed APIs from a Rust comment.

References

Tests

  • npx --no-install tsc -p . in sdk/node: passed.
  • npx --no-install tsc in sdk/node/tests/unit: passed.
  • node --test --test-reporter=tap <the test:unit file list> in sdk/node: 438 tests, 420 passed, 18 skipped, 0 failed.
  • cargo fmt --all -- --check in src: passed.
  • git diff --check: passed.
Microsoft Reviewers: Open in CodeFlow

Copilot AI balanced review requested due to automatic review settings October 21, 2026 18:14
@MGudgin
Gudge (MGudgin) requested a review from a team as a code owner October 21, 2026 18:14
@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.

🟢 Approval recommended

The removed implementation has no active consumers or supported exports, and the deleted tests cover only retired functionality.

No open issues 🎉

What changed in this PR

Removes the unused Node subprocess launch implementation left behind by the migration to in-process v1 APIs, without changing supported exports.

Changes:

  • Deletes retired launch helpers, logging code, and their tests.
  • Removes unused internal types and executable discovery helpers.
  • Updates documentation to describe v1 operations and experimental-backend restrictions.
File Description
src/​mxc-sdk/​src/​backends/​isolation_session/​common/​one_shot.rs Removes retired API names from a comment.
sdk/​node/​tests/​unit/​sandbox.test.ts Removes retired helper tests.
sdk/​node/​tests/​unit/​logger.test.ts Deletes logger tests.
sdk/​node/​src/​v1/​types.ts Removes unused internal constants and alias validation.
sdk/​node/​src/​v1/​platform.ts Removes unused macOS executable discovery.
sdk/​node/​src/​logger.ts Deletes the unused file logger.
sdk/​node/​src/​helper.ts Deletes subprocess launch helpers.
sdk/​node/​package.json Removes the deleted logger test from the unit command.
docs/​development/​guides/​authoring-a-new-feature.md Replaces obsolete SDK experimental-option guidance.
docs/​development/​architecture/​versioning.md Documents v1 experimental-backend restrictions.
docs/​development/​architecture/​container-lifecycle.md Clarifies experimental authorization.
docs/​development/​architecture/​backends/​isolation-session/​oneshot.md References Node v1 create-and-run operations.
docs/​backends/​nanvix/​nanvix.md Directs experimental MicroVM usage to the CLI.

Review effort: Balanced

This PR deletes sdk/node/src/helper.ts, the subprocess launch path behind the
retired spawnSandboxFromConfig family. Nothing in the package imported it
after the in-process v1 APIs replaced that path, so only its own tests still
exercised it. Docs that still described spawnSandboxFromConfig or an SDK
experimental option now describe the v1 behaviour.

Details

* Delete helper.ts, the FileLogger it alone used, and internal-only v1
  leftovers: ContainmentTypes, LegacyContainmentAliases,
  ExperimentalBackends, legacyConfigAliasUnsupportedReason and
  findSeatbeltExecutable.
* Remove the resolveExecutableAndArgs tests and logger tests.
* Document that published v1 SDKs never authorize experimental backends, so
  MicroVM and other experimental features run through wxc-exec
  --experimental.
* Point the IsolationSession one-shot note at the Node v1 create-and-run
  operations and drop removed APIs from a Rust comment.

Tests

* Node SDK tsc build and unit-test build passed; node --test over the
  test:unit file list: 438 tests, 420 passed, 18 skipped, 0 failed.
* cargo fmt --all -- --check and git diff --check passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ce647283-a4dd-44d4-995a-3e0ac8f5d574
Generated-with: claude-opus-5.5
Copilot AI balanced review requested due to automatic review settings October 21, 2026 22:35
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/remove_node_spawn_helper branch from f5b0d94 to 1db94cf Compare October 21, 2026 22:35

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.

🟡 Changes recommended

The versioning guide documents a native error code where Node v1 instead rejects experimental containment values during request validation.

1 open issue

Review effort: Balanced

Comment on lines +409 to +411
Their create-and-run and container lifecycle operations always pass the native
entry points' `experimental` argument as off, so a request that selects an
experimental backend fails with `backend_unavailable`. Exercise experimental
@MGudgin
Gudge (MGudgin) merged commit 7c89774 into main Oct 22, 2026
31 checks passed
@MGudgin
Gudge (MGudgin) deleted the user/gudge/remove_node_spawn_helper branch October 22, 2026 18:00
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