Repository navigation
[1.145] agentHost: retain SDK conversation IDs in restricted telemetry - #345688
Conversation
* agentHost: retain SDK conversation IDs in restricted telemetry Preserve the producing SDK session and child identities on restricted engine snapshots and carry the SDK session ID on host text/tool events. Keep host conversation fields independent and require no new runtime context API. Co-authored-by: Copilot <[email protected]> * agentHost: test SDK correlation at the event producer boundary Use distinct host and SDK session IDs in the existing wrapper-driven telemetry regression so omitting or misattributing any text/tool SDK ID fails the test. Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> (cherry picked from commit 3b3bea4)
There was a problem hiding this comment.
🔵 Needs a closer look
The backport has not been built or exercised against release/1.145’s pinned Copilot SDK, leaving telemetry/session and wrapper compatibility unverified by main-branch results.
No open issues 🎉
What changed in this PR
Backports #345609 to release/1.145, preserving Copilot SDK conversation identity in Agent Host restricted telemetry without changing existing host identifiers or consent controls.
Changes:
- Retains
sdkSessionIdon engine snapshots and host text/tools events, plussdkAgentIdon child engine calls. - Adds regression coverage for identity propagation, missing IDs, and restricted upload envelopes.
- Documents correlation semantics and the separate downstream retention requirements.
No actionable findings remain. Release-branch tests remain unverified because the prerequisite build was blocked by an installed SDK version mismatch.
| File | Description |
|---|---|
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts |
Verifies SDK identity propagation through event callbacks. |
src/vs/platform/agentHost/test/node/agentHostTelemetryReporter.test.ts |
Covers independent SDK identity and missing-ID behavior. |
src/vs/platform/agentHost/test/node/agentHostGitHubTelemetryRouter.test.ts |
Covers authoritative IDs, child identities, and upload envelopes. |
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts |
Passes the emitting wrapper’s SDK ID to telemetry reporters. |
src/vs/platform/agentHost/node/agentHostTelemetryReporter.ts |
Adds optional SDK identity to restricted text/tools events. |
src/vs/platform/agentHost/node/agentHostGitHubTelemetryRouter.ts |
Retains notification identities and declares telemetry classifications. |
src/vs/platform/agentHost/AGENTS.md |
Documents identity semantics and downstream retention boundaries. |
Review effort: Balanced
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |
cherry pick #345609 to add sdk session ID field for correlating telemetry within a chat thread