Repository navigation
fix(tests): compare exact spellings in the case-sensitive fake reader - #3787
Merged
Daniel Meppiel (danielmeppiel) merged 1 commit intoNov 17, 2026
Conversation
CaseSensitiveMaterializationReader.samefile compared Path objects. On Windows, WindowsPath equality is case-insensitive, so the fake reported apm_modules/Test and apm_modules/test as the same directory and the #3766 regression test recorded an extra owner rename (push run 44116362481, Windows x86_64). Compare .parts, which is case-sensitive on every platform, matching the case-sensitive file system the fake models. The product reader uses os.path.samefile and is unaffected. Mark the test windows_compat so the PR-time Windows gate runs it. Refs #3698 Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 17, 2026 16:23
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for this test-only Windows compatibility fix.
No open issues 🎉
What changed in this PR
This test-only follow-up to #3766 fixes a Windows failure in the fake case-sensitive filesystem reader. Production behavior is unchanged.
Changes:
- Compare absolute path components rather than
Pathobjects so distinct case spellings remain distinct on Windows. - Mark the affected regression test
windows_compatso it runs in the PR-time Windows Compatibility Gate.
| File | Description |
|---|---|
tests/unit/models/test_dependency_materialization.py |
Adds Windows gate coverage for the case-variant owner regression test. |
tests/helpers/prune_casing.py |
Makes the fake reader’s samefile comparison case-sensitive on every platform. |
Review effort: Balanced
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-fix-casesensitive-fake-reader-windows
branch
November 17, 2026 16:37
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
Push run 44116362481 on
74e5d220(#3766), Windows x86_64 Build & Test: 26647 passed, 1 failed:The bug is in the test fake, not the product.
tests/helpers/prune_casing.py::CaseSensitiveMaterializationReadersimulates a case-sensitive file system, but itssamefilecomparedPathobjects. On Windows,WindowsPathequality ignores case (PureWindowsPath('a/Test') == PureWindowsPath('a/test')isTrue, while their.partsdiffer). The fake therefore reported the distinct directoriesTestandtestas the same directory. The relocation logic then took the case-only rename branch for the owner, which added the extra('Test', 'apm_modules/test')move.The product reader uses
os.path.samefile, which correctly reports the real file system's answer, so production behavior is unchanged. (On a case-insensitive file system,Test/andtest/cannot exist as separate directories.)Changes:
samefilein the fake compares.parts, which is case-sensitive on every platform, as the case-sensitive file system it models requires.windows_compat, so the PR-time Windows Compatibility Gate runs it. That gate would have caught this failure before fix(tests): restore arm64 integration lanes for 0.36.0 #3766 merged.No CHANGELOG entry: this is a test-only fix for an unreleased-cycle regression.
Issue and approved scope
Issue: Refs #3698
Human scope-approval comment: freeze-exempt release fix requested by the 0.36.0 release captain. It is a test-only follow-up to #3766, inside that PR's approved scope (Refs #3649).
This PR completes the fix for the Windows failure. After merge, the release captain will rerun the release gate.
Type of change
Testing
Tested locally
All existing tests pass
Added tests for new functionality (if applicable)
.venv/bin/python -m pytest -p no:xdist -q tests/unit/models/test_dependency_materialization.py tests/unit/test_prune_casing.py(every user of the fake): 47 passed.-m windows_compat tests/unit/models/test_dependency_materialization.py: 3 passed, so the test is now selected by the Windows gate.PureWindowsPathcheck: path equality isTrueand.partsequality isFalseforTestvstest, which reproduces the Windows-only failure mode.ruff checkandformat --check(0.15.12) pass.Not run locally: real Windows. This PR's Windows Compatibility Gate runs the test.
Spec conformance (OpenAPM v0.1)
docs/src/content/docs/specs/openapm-v0.1.mdupdated(new/changed
<a id="req-XXX"></a>anchor + prose + Appendix Crow).
docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated.
@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated viauv run --extra dev python -m tests.spec_conformance.gen_statementand committed.