Repository navigation
[1.145] Backport edit-survival account attribution - #346275
Conversation
Capture the originating account tracking ID for file tools and preserve it in host edit-source state until delayed telemetry emission. Keep different accounts separate without exposing identity in protocol markers or source keys. Fixes microsoft/vscode-internalbacklog#10569 Co-authored-by: Copilot <[email protected]>
Update Copilot Chat's VS Code engine requirement while retaining its 0.73.0 package version. Co-authored-by: Copilot <[email protected]>
|
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 |
There was a problem hiding this comment.
🔵 Needs a closer look
The reported tests cannot establish end-to-end analytics attribution recovery without packaged Stable verification and deployed telemetry-ingestion validation.
No open issues 🎉
1 file not reviewed
extensions/copilot/package-lock.json: Generated file
What changed in this PR
Backports #345691 to preserve the originating Copilot account’s tracking ID in Agent Host edit-survival telemetry, including when accounts change before commit. Prepares the 1.145.1 recovery candidate without changing Copilot Chat’s 0.73.0 version.
Changes:
- Captures account identity at tool start and retains it through delayed reporting, keeping separate accounts distinct without exposing identity in protocol data or public source keys.
- Adds regression coverage for account switches, subagents, HydraFusion, flush retries, and missing or inapplicable identities.
- Updates VS Code to 1.145.1 and aligns Copilot’s engine requirement and lockfiles.
No actionable findings remain. Reported validation includes 77 passing focused tests; packaged Stable verification and deployed telemetry ingestion remain untested.
| File | Description |
|---|---|
src/vs/platform/agentHost/test/node/fileEditTracker.test.ts |
Verifies captured identity reaches edit attribution. |
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts |
Covers identity retention across account switches and dispatch paths. |
src/vs/platform/agentHost/test/node/agentEditAttributionService.test.ts |
Tests delayed reporting, account separation, and protocol exclusion. |
src/vs/platform/agentHost/node/shared/fileEditTracker.ts |
Passes captured identity to the attribution service. |
src/vs/platform/agentHost/node/shared/agentEditAttributionService.ts |
Retains identity per source and includes it in telemetry. |
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts |
Captures root or subagent identity when tools start. |
src/vs/platform/agentHost/common/fileEditAttribution.ts |
Adds the optional host-only tracking ID field. |
package.json |
Bumps VS Code to 1.145.1. |
package-lock.json |
Synchronizes the root package version. |
extensions/copilot/package.json |
Raises the VS Code engine requirement to ^1.145.1. |
extensions/copilot/package-lock.json |
Synchronizes Copilot’s engine requirement. |
Review effort: Balanced
This reverts commit 2dac9e3.
* test: bound and retry apt in the WSL smoke setup The Azure Ubuntu mirror usually serves the WSL smoke packages in 2-17 seconds, but a connection to it can fail or crawl for minutes. apt has no minimum transfer speed, so a crawling download ran past the 300 second command timeout (2 PR CI failures in 48h), and apt-get update only warns when it can't fetch the indexes, so the install then failed to find docker.io (main CI 491631). Bound the index update (now failing on any fetch error) and the package download, and retry each on fresh connections. A retried download resumes partial files. Co-authored-by: Copilot <[email protected]> * test: allow a slow mirror to finish the WSL smoke apt download across attempts This PR's own CI hit the slow case: the indexes came at 8 MB/s, but packages came at about 250 KB/s on every connection, so fresh connections alone don't help. Each bounded attempt keeps completed packages and resumes the partial one, so allow 5 download attempts and a 720 second budget for the step. Co-authored-by: Copilot <[email protected]> * test: let a slow but progressing WSL smoke apt download use the whole budget Instead of a hard per-attempt wall clock, which restarted a download that was progressing at about 250 KB/s, fail only a connection that stops sending data (Acquire::http::Timeout 30) and retry the download on error. Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
Backport #345691 so Copilot Agent Host edit-survival telemetry retains the originating account's tracking ID when edits are reported at commit time, including after an account switch. This restores attribution for the affected analytics without exposing identity in protocol data or public source keys.
The version bump is tracked separately in #346285. This PR contains only the edit-survival attribution backport.
The backport preserves the focused regressions from main and resolves one test-only conflict without importing an unrelated newer test helper.
Related: microsoft/vscode-internalbacklog#10569.
Validation
npm run compilewas blocked in the local Copilot extension build by unresolved@typescript/native/asyncand@typescript/native/astexports. The client fast build and targeted tests succeeded; dependencies were not changed to work around that local limitation.Packaged Stable verification and deployed telemetry ingestion are not yet exercised for this recovery candidate.
Fixes #346286.
WSL smoke setup reliability
Also backports #345598 unchanged to address slow Ubuntu mirror downloads timing out during WSL smoke setup before tests start. PowerShell syntax and exact file equivalence with the main fix passed; Windows CI will validate execution.