Agent Host: emit restricted repository info telemetry#326424
Draft
zhichli wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds restricted repository-information telemetry for Copilot SDK sessions in Agent Host.
Changes:
- Captures immutable Git snapshots at root-turn boundaries.
- Routes legacy-compatible telemetry with account, exclusion, and size safeguards.
- Adds Git helpers, configuration forwarding, and lifecycle coverage.
Show a summary per file
| File | Description |
|---|---|
src/vs/platform/agentHost/test/node/shared/copilotApiService.test.ts |
Tests exclusion discovery. |
src/vs/platform/agentHost/test/node/copilotGitProject.test.ts |
Updates Git mock. |
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts |
Tests telemetry lifecycle. |
src/vs/platform/agentHost/test/node/copilotAgent.test.ts |
Updates Git mock. |
src/vs/platform/agentHost/test/node/agentService.test.ts |
Updates Git mocks. |
src/vs/platform/agentHost/test/node/agentHostTelemetryReporter.test.ts |
Tests telemetry routing. |
src/vs/platform/agentHost/test/node/agentHostRepoInfoTelemetry.test.ts |
Tests collection and safeguards. |
src/vs/platform/agentHost/test/node/agentHostPullRequestOperationHandler.test.ts |
Updates Git mock. |
src/vs/platform/agentHost/test/node/agentHostGitService.test.ts |
Tests remote ordering. |
src/vs/platform/agentHost/test/node/agentHostGitService.integrationTest.ts |
Tests immutable snapshots. |
src/vs/platform/agentHost/test/node/agentHostDiscardChangesOperationHandler.test.ts |
Updates Git mock. |
src/vs/platform/agentHost/test/node/agentHostCommitOperationHandler.test.ts |
Updates Git mock. |
src/vs/platform/agentHost/test/electron-browser/remoteAgentHostProtocolClient.test.ts |
Tests debug-setting forwarding. |
src/vs/platform/agentHost/test/common/sessionTestHelpers.ts |
Extends no-op Git service. |
src/vs/platform/agentHost/node/shared/copilotApiService.ts |
Discovers exclusion state. |
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts |
Integrates turn lifecycle capture. |
src/vs/platform/agentHost/node/copilot/copilotAgent.ts |
Supplies token-current validation. |
src/vs/platform/agentHost/node/agentHostTelemetryReporter.ts |
Emits legacy telemetry schema. |
src/vs/platform/agentHost/node/agentHostRestrictedTelemetry.ts |
Extends immutable context. |
src/vs/platform/agentHost/node/agentHostRepoInfoTelemetry.ts |
Implements repository collection. |
src/vs/platform/agentHost/node/agentHostGitService.ts |
Adds snapshot and diff helpers. |
src/vs/platform/agentHost/electron-browser/localAgentHostService.ts |
Forwards local debug setting. |
src/vs/platform/agentHost/common/agentHostSchema.ts |
Defines root configuration key. |
src/vs/platform/agentHost/common/agentHostGitService.ts |
Extends Git service API. |
src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.ts |
Forwards remote debug setting. |
Review details
- Files reviewed: 25/25 changed files
- Comments generated: 2
- Review effort level: Medium
Capture immutable begin/end repository snapshots for root Copilot turns and emit the legacy request.repoInfo schema to enhanced GitHub and internal Microsoft telemetry. Reuse Agent Host Git baselines and tree snapshots so committed, working-tree, rename, delete, and untracked changes are represented without mutating the user's index. Bind every event to the session launch token's immutable telemetry context, suppress source diffs when content exclusion may be enabled, and detect account, abort, and mid-capture tree changes before sending. Match the legacy safety and payload limits, multiplex large diffs, support GitHub/GHE/Azure DevOps remotes, and forward the existing repo-info debug kill switch into Agent Host config. Refs microsoft/vscode-internalbacklog#8247
zhichli
force-pushed
the
zhichli/restr5th-v2
branch
from
July 18, 2026 04:40
64b3dd2 to
4fff98c
Compare
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.
Implements repository-info telemetry parity for Copilot SDK sessions in Agent Host.
request.repoInfoschema to enhanced GitHub and internal Microsoft telemetry with the existing safety, size, multiplexing, and debug-disable behavior.Validation:
npm run typecheck-clientnpm run valid-layers-checkRefs microsoft/vscode-internalbacklog#8247