Skip to content

fix: Windows path support and canonicalization#13671

Open
edemaine wants to merge 1 commit intoanomalyco:devfrom
edemaine:windows-paths
Open

fix: Windows path support and canonicalization#13671
edemaine wants to merge 1 commit intoanomalyco:devfrom
edemaine:windows-paths

Conversation

@edemaine
Copy link

@edemaine edemaine commented Feb 15, 2026

What does this PR do?

This is a followup to #13659 when I realized how many existing tests fail on Windows. With the two PRs together, the number of failures drops from 74 to 8.

The important change here is to not use split(":", 2) to remove the initial part of a patch message. Crucially, split(":", 2) discards anything after a second occurrence of ":", meaning that all absolute Windows paths (C:\...) were unsupported. I can't tell you how many times I've seen the message "Patch failed - can't find file named 'C'" and the AI switches to using relative paths as a workaround. This should fix that.

Otherwise just a bunch of \/ normalization.

Fixes #10360. Now I see that #6763 might have done most of my work already. ☹️

How did you verify your code works?

bun run test - number go down

@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

The PR #13671 is a followup to #13659 as explicitly mentioned in the description, but PR #13659 (fix(desktop): change detection on Windows, especially Cygwin) is the related predecessor, not a duplicate. No other open PRs are addressing the same Windows path support and canonicalization issues.

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.

Windows apply_patch fails

1 participant

Comments