Skip to content

fix: windows case sensitivity in pkg cache variants uri#2107

Open
maxnbk wants to merge 2 commits into
AcademySoftwareFoundation:mainfrom
maxnbk:fix/windows-case-sensitivity-in-pkg-cache-variants-uri
Open

fix: windows case sensitivity in pkg cache variants uri#2107
maxnbk wants to merge 2 commits into
AcademySoftwareFoundation:mainfrom
maxnbk:fix/windows-case-sensitivity-in-pkg-cache-variants-uri

Conversation

@maxnbk
Copy link
Copy Markdown
Contributor

@maxnbk maxnbk commented May 14, 2026

Closes #2101 .

Explanation:

get_package_from_uri in the filesystem package repository applied os.path.normcase to the entire URI before slicing out the package name and version. On Windows, normcase lowercases the whole string, silently corrupting mixed-case names (FooBar -> foobar) and versions (1.0B -> 1.0b) before they were used for lookup, causing both to return None.

Fix:

We scope the normcase usage to the is_subdirectory boundary check only. The subsequent name/version extraction slices from the original URI, preserving caller-supplied casing.

Disclosure:

This PR was AI-assisted with Claude Code, Sonnet 4.6, primarily for diagnostics, logic-tracing, documentation and edge-case verification.

maxnbk added 2 commits May 14, 2026 17:49
…sensitive path handling

Signed-off-by: Stephen Mackenzie <maxnbk@users.noreply.github.com>
…ng pkg-cache operations

Signed-off-by: Stephen Mackenzie <maxnbk@users.noreply.github.com>
@maxnbk maxnbk requested a review from a team as a code owner May 14, 2026 21:54
@maxnbk maxnbk added bug devdays26 ASWF Dev Days 2026 labels May 14, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.65%. Comparing base (d415b96) to head (f2dfcca).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2107   +/-   ##
=======================================
  Coverage   60.65%   60.65%           
=======================================
  Files         164      164           
  Lines       20584    20584           
  Branches     3579     3579           
=======================================
  Hits        12485    12485           
  Misses       7224     7224           
  Partials      875      875           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

bug devdays26 ASWF Dev Days 2026

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rez-pkg-cache fails on Windows for packages with upper-case characters

1 participant