microsoft / microsoft/vscode

Test: Late enterprise OTel policy recovery in Copilot Local

Open
#336,872 1 comment 0 reactions 1 assignee View on GitHub

@jruales is already working on this.

Since Sep 19, 2026.

testplan-item
Dominant language
TypeScript
Stars
193k
Forks
42.7k
PR merge metrics
PR metrics pending

Description

Refs: https://github.com/microsoft/vscode/pull/336701, https://github.com/microsoft/vscode/issues/336102

- [ ] macOS

Complexity: 3

Authors: @rwoll

Assigned to: @jruales

---

This TPI ensures that enterprise-managed VS Code instances do not drop OTel from Chat when enterprise policy is updated on disk. Copilot Chat should restart its OTel service so the new policy takes effect.

This does not affect Agent Host. Ensure **Local** is selected in the harness picker while testing.

## Set up

- Close other VS Code windows. The helper changes machine-wide policy; do not remove existing organizational policy.
- Start without managed OTel policy or OTel environment overrides. Keep `github.copilot.chat.otel.enabled` and `github.copilot.chat.otel.dbSpanExporter.enabled` off.
- Enable `chat.editor.localAgent.enabled` in Settings and sign in. Ensure **Local**, not **Copilot**, is selected in the harness picker.

## Test

1. Send `Reply with OK` and wait for completion.
2. Download [`otel-restart-test.cjs`](https://gist.github.com/rwoll/10ca818de4a1e5b44d527d54914c7270#file-otel-restart-test-cjs) and run in an external terminal AFTER inspecting it:

```sh
sudo node otel-restart-test.cjs
```

Press **Enter** and return to Insiders. Policy is applied after **8 seconds**.
3. Look for a brief progress notice and **one automatic extension-host restart**. Do not manually reload.
4. Ensure **Local** is still selected and send `Reply with OK`. Within about **10 seconds**, the terminal should show `POST /v1/traces` with a **nonzero span count**. There should be no repeated restarts.

## Cleanup

Wait **120 seconds** or press **Ctrl+C**. Confirm the helper removed its test policy, then **fully quit Insiders** and restore test-only settings changes.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.