Skip to content

Infrastructure: Guard neutral desktop package dependency and import boundaries #4438

Closed

Description

@JasonVMo

Goal

desktop-driver, desktop-test, and desktop-driver-mcp must stay usable without Storybook, React, or React Native, but that boundary is enforced only by convention. Native helper resolution (resolveNativeDesktopDriver) is available only from the driver's root entry, so the MCP adapter loads the root entry and its WDIO imports. Add tests that enforce the dependency boundary and a narrow native entry point.

Part of #4435 (plan item F7).

Scope

  • Owner: package-boundary tests.
  • Paths (under packages/agentic/): focused tests in desktop-driver, desktop-test, and desktop-driver-mcp; the desktop-driver/package.json export map.
  • Add a @fluentui-react-native/desktop-driver/native subpath that points at the helper resolution and verification implementation, not a re-export layer, and move the MCP adapter to it.
  • Add negative fixtures that detect React, React Native, or Storybook imports or dependencies in the neutral packages.
  • Add a standalone application consumer fixture that needs no Storybook package.

Dependencies

Acceptance

  • Negative fixtures fail when a neutral package gains a React, React Native, or Storybook import or dependency.
  • A standalone application consumer builds and runs without Storybook packages.
  • The MCP adapter no longer imports the driver root entry; it uses only the declared client, operations, authority, and native surfaces.
  • Checks cover a real dependency boundary, not constants or file-name spelling.

Validation

  • Iterate with focused yarn test <name> in each changed package, then run its yarn format, yarn lint, yarn build, and yarn test. Finish with yarn clean-lage-cache then yarn lage buildci; run yarn lage test-links --verbose --grouped after markdown changes.
  • Add a patch changeset for each changed published package. Update the owning references/current-status.md rows (done, work in progress, unsupported) and affected README/AGENTS guidance in the same change.
  • Native, provider, or process-topology changes need matching-OS native contracts and the affected consumer lane. JavaScript tests and bundles do not qualify native behavior; hosted capability skips are not passes. Report each check as passed, failed, skipped, not run, or unsupported.

Evidence

  • Current imports: packages/agentic/desktop-driver-mcp/src/connection.ts imports resolveNativeDesktopDriver from the driver root entry.
  • Retired plan: driver-next.md at 0569e1b86, sections 5 and 8 (F7).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions