Skip to content

[1.145] Backport edit-survival account attribution - #346275

Merged
Aaron Munger (amunger) merged 4 commits into
release/1.145from
recovery/1.145.1-edit-survival
Nov 5, 2026
Merged

Aaron Munger (amunger) merged 4 commits into
release/1.145from
recovery/1.145.1-edit-survival

Conversation

@amunger

@amunger Aaron Munger (amunger) commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Focused Agent Edit Attribution Service, FileEditTracker, root/subagent and HydraFusion account-attribution tests: 77 passed on this release port.
  • Client-only fast build, targeted ESLint, version/lockfile consistency, and whitespace checks passed.
  • Full npm run compile was blocked in the local Copilot extension build by unresolved @typescript/native/async and @typescript/native/ast exports. 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.

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]>
Copilot AI balanced review requested due to automatic review settings November 5, 2026 16:06

Copilot AI commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

One or more custom setup steps configured for this repository failed during this Copilot code review run:

Setup pnpm

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 copilot-code-review.yml file. Read the docs for details.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

@amunger
Aaron Munger (amunger) marked this pull request as ready for review November 5, 2026 16:13
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: a717861c Current: 37755ef1

Changed (2)

sessions/inbox/inboxNotificationsView/Evidence/Light
Before After
before after
sessions/inbox/inboxNotificationsView/EvidenceNarrow/Light
Before After
before after

@amunger Aaron Munger (amunger) changed the title [1.145] Backport edit-survival account attribution and bump to 1.145.1 [1.145] Backport edit-survival account attribution Nov 5, 2026
* 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]>
@amunger
Aaron Munger (amunger) enabled auto-merge (squash) November 5, 2026 17:43
@amunger
Aaron Munger (amunger) merged commit c3c8107 into release/1.145 Nov 5, 2026
55 checks passed
@amunger
Aaron Munger (amunger) deleted the recovery/1.145.1-edit-survival branch November 5, 2026 17:43
@vs-code-engineering vs-code-engineering Bot added this to the 1.145.2 milestone Nov 5, 2026
@amunger Aaron Munger (amunger) mentioned this pull request Nov 6, 2026
25 tasks done
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.

5 participants