Skip to content

Fix native MDM plugin marketplace parsing - #333822

Open
Joel Thiessen (jatjat) wants to merge 1 commit into
microsoft:mainfrom
jatjat:agents/fix-object-form-enterprise-marketplaces
Open

Fix native MDM plugin marketplace parsing#333822
Joel Thiessen (jatjat) wants to merge 1 commit into
microsoft:mainfrom
jatjat:agents/fix-object-form-enterprise-marketplaces

Conversation

@jatjat

Copy link
Copy Markdown

Fixes #333816

Summary

Native MDM delivers structured managed settings as JSON inside an OS string. After the policy layer parses a documented object-form extraKnownMarketplaces value, readConfiguredMarketplaces() silently discarded each marketplace because it accepted only string values.

This change preserves object-form values, adds the marketplace dictionary key as their name, and forwards them to the existing object parser. Existing string-map behavior remains unchanged. A focused regression test covers the native-MDM object shape, including autoUpdate.

Evidence

Why This Layer

parseMarketplaceObjectEntry() already supports the documented nested shape. Letting object values reach that parser fixes native MDM without changing policy ingestion or the canonical string-map path used by other delivery channels.

Testing

  • npm run compile-client
  • ./scripts/test.sh --run src/vs/workbench/contrib/chat/test/common/plugins/pluginMarketplaceService.test.ts (94 passing)
  • npm run eslint -- src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.ts src/vs/workbench/contrib/chat/test/common/plugins/pluginMarketplaceService.test.ts
  • Manual clean-profile A/B with native MDM:
    • Unpatched Code OSS showed no managed agent plugins.
    • Patched Code OSS displayed the managed plugin, installed it, and loaded its skill in Copilot Chat.

Copilot AI balanced review requested due to automatic review settings September 1, 2026 17:42

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.

Pull request overview

Fixes native MDM object-form plugin marketplaces being discarded during configuration parsing.

Changes:

  • Preserves and names object-form managed marketplace entries.
  • Adds regression coverage for Git sources and autoUpdate.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
marketplaceReference.ts Supports object-form policy entries.
pluginMarketplaceService.test.ts Tests native MDM marketplace parsing.

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

@jatjat

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="Canadian Tire Corporation, Limited"

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.

Native MDM ignores documented object-form plugin marketplaces

3 participants