Repository navigation
fix: preserve Windows drive paths in bundle catalog config - #5205
Open
chelsealong wants to merge 1 commit into
Open
chelsealong wants to merge 1 commit into
chelsealong wants to merge 1 commit into
Conversation
yxshee
reviewed
Nov 1, 2026
yxshee
left a comment
Contributor
There was a problem hiding this comment.
I checked this against main (7370e59). On main, add_source(project, r"C:\catalog.json", ...) on Linux stores /<project>/C:\catalog.json with id c--catalog, as #5204 describes. With the change, the URL is stored verbatim and the id becomes catalog, which is the id the same input gets on Windows, so a config is now consistent across hosts.
Two things I noticed, neither blocking:
- On a POSIX host the preserved
C:\catalog.jsonentry still can't be read.adapters.pyopens it asPath(url)relative to the working directory and raisesCatalog file not found: C:\catalog.json. That's a clear error, so it's fine. If you'd rather catch it atbundle catalog addtime, the issue's other option (reject a foreign drive path on POSIX) would do that. C:\catalog.jsonandC:/catalog.jsonare the same file on Windows, where both canonicalize toC:\catalog.jsonand the second add returnsunchanged. On POSIX they're now stored verbatim, so the second add fails with "already exists" because the idcatalogcollides.remove_source(project, "C:/catalog.json")also won't remove an entry stored asC:\catalog.jsonon POSIX. Normalizing withstr(PureWindowsPath(url))instead of returningurlunchanged would make both spellings behave the same way on every host.
Posted on behalf of @yxshee. AI disclosure: Claude Code (model: Claude Opus 5.5, autonomous) reproduced the issue on main, checked the change's behavior by applying the same two-line logic to main, and drafted this review. I did not run the PR branch itself.
Generated by Claude Code
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #5204. Preserve Windows drive paths verbatim when a POSIX host adds a bundle catalog, preventing the host’s
Path.resolve()from rewriting them into project-relative paths. Native paths retain their existing behavior.Testing
specify --help, andgit diff --checkpassed.AI Disclosure
AI disclosure: OpenAI Codex (GPT-6, reasoning effort setting not exposed) worked autonomously to investigate the issue, generate the code and test, and run validation. This does not claim human review or testing.