Skip to content

Gate external ingest on policy on token#316142

Draft
mjbvz wants to merge 1 commit into
mainfrom
dev/mjbvz/important-anglerfish
Draft

Gate external ingest on policy on token#316142
mjbvz wants to merge 1 commit into
mainfrom
dev/mjbvz/important-anglerfish

Conversation

@mjbvz
Copy link
Copy Markdown
Collaborator

@mjbvz mjbvz commented May 12, 2026

This allows enterprises to opt out of external ingest

Copilot AI review requested due to automatic review settings May 12, 2026 23:02
This allows enterprises to opt out of external ingest
@mjbvz mjbvz force-pushed the dev/mjbvz/important-anglerfish branch from f9cf0af to 95c4bd8 Compare May 12, 2026 23:04
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 adds an enterprise policy gate (driven by a Copilot token flag) to control whether “external ingest” for workspace chunk search is allowed, and wires that policy into a VS Code context key for command enablement.

Changes:

  • Gate CodeSearchChunkSearch.isExternalIngestEnabled() on a new token flag (blackbird_external_indexing).
  • Add CopilotToken.isBlackbirdExternalIndexingEnabled() with accompanying unit tests.
  • Introduce a new context key (github.copilot.blackbirdExternalIndexingDisabled) and use it to enable/disable the deleteExternalIngestWorkspaceIndex developer command.
Show a summary per file
File Description
extensions/copilot/src/platform/workspaceChunkSearch/node/codeSearch/codeSearchChunkSearch.ts Adds token-based gating before reading the external ingest experiment config.
extensions/copilot/src/platform/authentication/test/node/copilotToken.spec.ts Adds unit tests for the new token flag helper.
extensions/copilot/src/platform/authentication/common/copilotToken.ts Introduces isBlackbirdExternalIndexingEnabled() for reading token policy.
extensions/copilot/src/extension/contextKeys/vscode-node/contextKeys.contribution.ts Adds/updates a context key reflecting whether external indexing is disabled by token policy.
extensions/copilot/package.json Uses the new context key to conditionally enable the delete-external-ingest command.

Copilot's findings

  • Files reviewed: 5/5 changed files
  • Comments generated: 2

const copilotToken = await this._authenticationService.getCopilotToken();
commands.executeCommand('setContext', blackbirdExternalIndexingDisabledContextKey, !copilotToken.isBlackbirdExternalIndexingEnabled());
} catch (e) {
commands.executeCommand('setContext', blackbirdExternalIndexingDisabledContextKey, undefined);
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