Skip to content

IDE extensions: workspace trust (#263) and measured compatibility (#264) - #296

Merged
aMonteSl merged 5 commits into
idefrom
claude/project-thread-keii8k
Nov 27, 2026
Merged

aMonteSl merged 5 commits into
idefrom
claude/project-thread-keii8k

Conversation

@aMonteSl

@aMonteSl aMonteSl commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Adrián · project thread

The last two stories of epic #251.

#263: extensions and workspace trust

  • runState.ts: one pure rule for whether an extension runs (enabled, disabled, restricted): in Restricted Mode only extensions that declare capabilities.untrustedWorkspaces.supported (true or "limited") run code; themes and grammars always apply; --disable-extensions and the person's choice always win. extensionsService.ts uses it.
  • Tests for the rule, the manifest flag, and a real host where workspace.isTrusted follows the IDE and onDidGrantWorkspaceTrust fires once.
  • Trust dialog text, README and docs/ide/extensions.md updated.

#264: compatibility, measured

  • compatProbe.ts + scripts/extensionCompat.mjs (npm run compat): installs each .vsix through ExtensionStore, starts the real extension host in Node, fires its activation events, and reports activation, missing vscode API, errors and registered commands. Takes files, folders or Open VSX ids (same client and SHA-256 check as the IDE).
  • New CI job Popular extensions in the extension host: probes ~30 popular Open VSX extensions and writes the table to the job summary. continue-on-error: a measurement, never a gate.
  • docs/ide/extensions-compatibility.md: method, local results (13 packages incl. Code-XR: all with code activate, no missing API), known limits (language packs have no effect, icon themes not applied, unimplemented API areas).

Testing

  • npm test in apps/ide: typecheck, lint (0 warnings), unit tests incl. the new extensionCompat.test.ts and extensionTrust.test.ts.
  • npm run compat over the 13 local packages: all as in the doc.

Closes #263, closes #264 (closed by hand after merge, ide is not the default branch).

#263)

- runState.ts: the pure rules of whether an extension runs (enabled in
  extensions.json, --disable-extensions, Restricted Mode with
  untrustedWorkspaces.supported true or "limited"), used by the service
- Tests: the rules, the manifest flag, workspace.isTrusted and
  onDidGrantWorkspaceTrust in a real host
- Restricted Mode summary names extensions; README trust paragraph and
  security baseline row; docs/ide/extensions.md
…ost (#264)

- compatProbe.ts installs a .vsix through ExtensionStore, starts the
  extension host in Node, fires its activation events and records the
  outcome, the vscode API it misses and the errors it logs
- scripts/extensionCompat.mjs (npm run compat): local files, folders or
  Open VSX downloads; Markdown table and JSON output
- CI job measuring ~30 popular Open VSX extensions, never a gate
- docs/ide/extensions-compatibility.md: method, results, known limits
@aMonteSl aMonteSl self-assigned this Nov 27, 2026
The host process kept its working directory, the scratch folder, locked.
It no longer runs there, the probe waits for it to exit, and the folder
removal retries.
…ty probe found (#264)

Measured on 30 popular Open VSX extensions, five failed to activate.
- import 'vscode' from an ES module (esbenp.prettier-vscode) resolves to
  the extension's API through module.registerHooks
- VSCODE_NLS_CONFIG is set, as VS Code does (yzhang.markdown-all-in-one)
- enums of unimplemented areas exist, so reading them at start-up no
  longer throws (TestRunProfileKind: ms-python.python;
  QuickInputButtonLocation: eamodio.gitlens; and 14 more)
- the probe ignores Node deprecation warnings
@aMonteSl
aMonteSl merged commit 29ff1b2 into ide Nov 27, 2026
17 checks passed
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.

2 participants