exp: set exp header if snippy is in blocking mode#4032
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for an sn (Snippy blocking mode) flag from the Copilot token into the experimentation user info cache and ExP filter headers, enabling experiment targeting based on Snippy’s blocking state.
Changes:
- Parse
sn=1from the Copilot token (CopilotToken.isSn()). - Persist
isSninUserInfoStoreand include it in GitHub account ExP filter headers (X-GitHub-Copilot-IsSn). - Add unit tests validating
isSndetection and caching behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/platform/telemetry/vscode-node/microsoftExperimentationService.ts | Adds X-GitHub-Copilot-IsSn filter and logs isSn alongside other user filters. |
| src/platform/telemetry/test/node/experimentation.spec.ts | Adds tests for sn flag detection and persistence via UserInfoStore/globalState. |
| src/platform/telemetry/node/baseExperimentationService.ts | Extends UserInfoStore to track/persist isSn and treat it as part of change detection. |
| src/platform/authentication/common/copilotToken.ts | Adds isSn() token flag accessor based on sn=1. |
alexr00
approved these changes
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.