Skip to content

chat: Enforce per-marketplace plugin auto-updates - #327844

Merged
joshspicer merged 3 commits into
mainfrom
agents/vscode-issue-8462-implementation
Jul 31, 2026
Merged

joshspicer merged 3 commits into
mainfrom
agents/vscode-issue-8462-implementation

Conversation

@joshspicer

@joshspicer joshspicer commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes microsoft/vscode-internalbacklog#8462

Summary

Enterprise-managed plugin marketplaces can now specify autoUpdate independently of the user-controlled extensions.autoUpdate setting.

This change:

  • preserves extraKnownMarketplaces.<name>.autoUpdate through managed-settings normalization; entries without an override retain the legacy source string, while explicit overrides use a JSON-encoded string so the managed setting remains compatible with the inline Settings object renderer
  • carries the managed override into IMarketplaceReference and resolves it by canonical marketplace ID, so equivalent GitHub shorthand and URL forms share one policy
  • replaces the global hasUpdatesAvailable boolean with the canonical IDs of marketplaces that actually have updates
  • schedules checks when global auto-update is enabled or any managed marketplace explicitly enables it
  • queues marketplace IDs reported during an in-flight update and acknowledges only IDs already processed
  • targets automatic refreshes and updates to eligible marketplace IDs
  • enforces strictKnownMarketplaces in both bulk and direct/manual plugin update paths
  • preserves unrelated cached marketplace metadata during targeted refreshes
  • regenerates the checked-in policy catalog with the updated managed-setting description

Precedence

For each marketplace:

  1. An explicit managed autoUpdate: true or false wins.
  2. If autoUpdate is undefined, the marketplace inherits extensions.autoUpdate.
  3. strictKnownMarketplaces is enforced before every refresh and update entry point.

Tests

Added coverage for managed-setting normalization, explicit true/false values, undefined inheritance, canonical-ID matching, duplicate user/managed entries, mixed targeted marketplaces, global auto-update disabled, updates arriving concurrently, direct and bulk strict-policy blocking, and malformed policy entries.

Validated with:

  • npm run compile-client
  • npm run valid-layers-check
  • npm run precommit
  • targeted ESLint
  • 169 targeted unit tests across managed settings and plugin marketplace/update services
  • 229 build tests including policy conversion
  • clean fixture-based policy catalog export

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

Adds enterprise-managed, per-marketplace plugin auto-update overrides and targets automatic updates to eligible marketplaces.

Changes:

  • Preserves autoUpdate through managed-settings normalization and marketplace parsing.
  • Tracks and updates marketplaces individually while enforcing global and strict policies.
  • Adds focused coverage and updates policy documentation.
Show a summary per file
File Description
.github/skills/add-policy/github-managed-settings.md Documents the managed override.
src/vs/base/common/managedSettings.ts Encodes marketplace update policy.
src/vs/platform/policy/common/copilotManagedSettings.ts Normalizes managed autoUpdate.
src/vs/platform/policy/test/common/fileManagedSettingsService.test.ts Tests policy normalization.
src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts Extends policy configuration schema.
src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.ts Dispatches targeted automatic updates.
src/vs/workbench/contrib/chat/browser/pluginInstallService.ts Filters and validates bulk updates.
src/vs/workbench/contrib/chat/common/plugins/AGENTS_PLUGINS.md Documents update behavior.
src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.ts Carries per-marketplace overrides.
src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.ts Extends bulk-update options.
src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.ts Detects eligible marketplace updates.
src/vs/workbench/contrib/chat/test/browser/plugins/pluginAutoUpdate.test.ts Tests targeted dispatch.
src/vs/workbench/contrib/chat/test/browser/plugins/pluginInstallService.test.ts Tests update filtering.
src/vs/workbench/contrib/chat/test/common/plugins/pluginMarketplaceService.test.ts Tests policy resolution and identity.

Review details

  • Files reviewed: 14/14 changed files
  • Comments generated: 4
  • Review effort level: Medium

@joshspicer
joshspicer force-pushed the agents/vscode-issue-8462-implementation branch from 6bdf50e to d9e1336 Compare July 31, 2026 22:50
@github-actions

github-actions Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Base: 7d661297 Current: 4a7c8c25

No screenshot changes.

@joshspicer
joshspicer marked this pull request as ready for review July 31, 2026 23:16
@joshspicer
joshspicer force-pushed the agents/vscode-issue-8462-implementation branch from d9e1336 to 0d3b0b3 Compare July 31, 2026 23:21
@joshspicer
joshspicer enabled auto-merge (squash) July 31, 2026 23:26
@joshspicer
joshspicer merged commit d5eb7d2 into main Jul 31, 2026
46 of 47 checks passed
@joshspicer
joshspicer deleted the agents/vscode-issue-8462-implementation branch July 31, 2026 23:58
@vs-code-engineering vs-code-engineering Bot added this to the 1.132.0 milestone Jul 31, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Sep 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants