Skip to content

smoke: wait for copilot-chat extension before writing its settings#320255

Merged
alexdima merged 1 commit into
mainfrom
agents/i-have-these-learnings-smoke-test-failure-chat-46913371
Jun 7, 2026
Merged

smoke: wait for copilot-chat extension before writing its settings#320255
alexdima merged 1 commit into
mainfrom
agents/i-have-these-learnings-smoke-test-failure-chat-46913371

Conversation

@alexdima
Copy link
Copy Markdown
Member

@alexdima alexdima commented Jun 6, 2026

Problem

The Chat Sessions smoke tests (Test Copilot CLI session, Test Claude session) fail on macOS arm64 Electron with:

Unable to write to User Settings because github.copilot.chat.backgroundAgent.enabled is not a registered configuration.

The smoke test helper writes copilot-chat–contributed config keys before the GitHub.copilot-chat extension is installed in the ext host. The rejected write surfaces a blocking error dialog, which makes the test time out.

Fix

Add a waitForExtension helper that polls vscode.extensions.getExtension() until the extension is visible, then activates it. Both smoketest.openCopilotCliChat and smoketest.openClaudeChat now call waitForExtension('GitHub.copilot-chat', 60_000) before writing any github.copilot.chat.* settings, ensuring the contributed configuration keys are registered first.

The Chat Sessions smoke tests wrote copilot-chat config keys before the
extension was installed in the ext host, triggering a 'not a registered
configuration' error dialog that blocked the UI and timed out the tests.

Add a waitForExtension helper that polls vscode.extensions.getExtension
and activates the extension, then call it before any config writes in
both openCopilotCliChat and openClaudeChat commands.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 6, 2026 19:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR stabilizes the Chat Sessions smoke tests by ensuring the GitHub.copilot-chat extension is present (and activated) before the smoketest helper writes github.copilot.chat.* settings, preventing “unregistered configuration” errors that trigger a blocking dialog and timeouts.

Changes:

  • Add a waitForExtension(extensionId, timeoutMs) helper that polls vscode.extensions.getExtension() and activates the extension once found.
  • Call waitForExtension('GitHub.copilot-chat', 60_000) before updating Copilot Chat-contributed settings in the Copilot CLI and Claude smoke test entrypoints.
Show a summary per file
File Description
test/smoke/extensions/vscode-smoketest-ext-host/extension.js Adds an extension wait/activate helper and uses it to ensure Copilot Chat settings are written only after the extension is available.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread test/smoke/extensions/vscode-smoketest-ext-host/extension.js
@alexdima alexdima merged commit ff95d7c into main Jun 7, 2026
26 checks passed
@alexdima alexdima deleted the agents/i-have-these-learnings-smoke-test-failure-chat-46913371 branch June 7, 2026 18:50
@vs-code-engineering vs-code-engineering Bot added this to the 1.124.0 milestone Jun 7, 2026
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