Skip to content

[cherry-pick] nes: fix: normalize Windows workspace path casing - #333610

Closed
vs-code-engineering[bot] wants to merge 1 commit into
release/1.136from
cherry-pick/333429
Closed

[cherry-pick] nes: fix: normalize Windows workspace path casing#333610
vs-code-engineering[bot] wants to merge 1 commit into
release/1.136from
cherry-pick/333429

Conversation

@vs-code-engineering

Copy link
Copy Markdown
Contributor

Cherry-pick of #333429 from main.

Fixes #325491

Root cause

NES creates its document ID from doc.uri.toString(). On Windows, URI serialization lowercases the drive letter, producing /c:/workspace/..., while the workspace-folder URI can retain /C:/workspace. toUniquePath compared these paths case-sensitively, failed to strip the workspace root, and leaked an absolute drive path into the Lysithea prompt and speculative prediction.

The first native Windows CI run reproduced this exactly:

Expected: "space folder/test.py:"
Received: "/c:/workspace/space folder/test.py:"

Fix

  • Normalize only the Windows drive-letter segment before workspace-root comparison.
  • Preserve case-sensitive semantics for every other path segment, including virtual notebook providers.
  • Cover file-backed notebook cells with fragment retention and case-sensitive virtual notebook cells.
  • Make response coverage assert progressive reveal, which requires correct active-document matching.

Validation

  • Initial native Windows CI reproduced the absolute-path leak.
  • Refined fix passed Copilot - Test (Windows).
  • All actual PR CI checks passed.
  • Targeted Xtab tests: 267 passed, 4 Windows-only tests skipped on macOS.
  • ESLint passed for all changed files.

The draft-only VS Code PR Check policy remains pending.

Copilot AI balanced review requested due to automatic review settings August 31, 2026 18:22
@vs-code-engineering vs-code-engineering Bot added the cherry-pick-artifact Auto-generated cherry-pick PR label Aug 31, 2026

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.

Pull request overview

Fixes Windows NES path matching by normalizing drive-letter casing while preserving other path casing.

Changes:

  • Normalize Windows drive letters during workspace-relative path comparison.
  • Preserve notebook fragments and virtual-path case sensitivity.
  • Add Windows coverage for prompts, notebooks, and progressive patch reveal.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
promptCraftingUtils.ts Normalizes drive-letter casing for relative paths.
xtabProvider.spec.ts Tests Windows and notebook path handling.
xtabPatchResponseHandler.spec.ts Tests progressive edits for Windows paths with spaces.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 5c917327 Current: 7a44938e

Changed (1)

chat/aiCustomizations/aiCustomizationManagementEditor/McpServersSearch/Light
Before After
before after

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

@vritant24

Copy link
Copy Markdown
Member

Ulugbek Abdullaev (@ulugbekna) since we are now past endgame, does this need to still be taken in this release or can this flow into next week's release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-artifact Auto-generated cherry-pick PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants