Skip to content

Fix missed same-size edits when capturing agent host Git snapshots - #339051

Merged
Vijay Upadya (vijayupadya) merged 1 commit into
mainfrom
average-armadillo
Oct 1, 2026
Merged

Vijay Upadya (vijayupadya) merged 1 commit into
mainfrom
average-armadillo

Conversation

@vijayupadya

Copy link
Copy Markdown
Contributor

Fixes an issue that caused the overlay integration test to fail intermittently on macOS.

Copying Git’s index on macOS/Linux gives it a newer modification timestamp, defeating Git’s racy-clean detection and potentially omitting same-size working-tree edits from snapshots.

  • Preserve the original index timestamps when copying to the temporary index.
  • Add a deterministic regression test for same-size edits, verifying that the real index remains unchanged.
  • Keep the existing overlay test enabled and retain the index-copy optimization.

Copilot AI balanced review requested due to automatic review settings October 1, 2026 06:05

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.

Copilot review overview

🟢 Approval recommended

The focused fix safely falls back on copy failure and is covered by a deterministic regression test.

Review effort: Balanced
Findings: None

What changed in this PR

Fixes missed same-size working-tree edits when creating Agent Host Git snapshots.

Changes:

  • Preserves index timestamps on temporary copies.
  • Adds a deterministic racy-clean regression test.
  • Verifies the real Git index remains unchanged.
File Description
src/​vs/​platform/​agentHost/​node/​agentHostGitService.ts Preserves timestamps when copying the Git index.
src/​vs/​platform/​agentHost/​test/​node/​agentHostGitService.integrationTest.ts Tests same-size edit capture and index immutability.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: dc546cc3 Current: f9b2b6c7

Changed (2)

chat/aiCustomizations/aiCustomizationManagementEditor/DiscoverInfiniteScroll/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/DiscoverPluginsLoadingMore/Light
Before After
before after

1 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details.

@vijayupadya
Vijay Upadya (vijayupadya) merged commit d449c5a into main Oct 1, 2026
36 checks passed
@vijayupadya
Vijay Upadya (vijayupadya) deleted the average-armadillo branch October 1, 2026 09:27
@vs-code-engineering vs-code-engineering Bot added this to the 1.141.0 milestone Oct 1, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Nov 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants