config: detect Windows cache/data directory case overlap #61
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/61"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from uiliannn/VItoriaBr. Originally posted by LouisRiverstone on 2026-11-25T21:22:21Z.
Fixes #55.
Summary
Tests
Added Windows-specific config regressions for equal, nested, accented, and sibling paths.
Imported from uiliannn/VItoriaBr. Originally posted by lmouz823-lang on 2026-11-28T04:40:17Z.
I can take a native Windows semantic review at exact head
43077e483f2f606c7a0795823077ac4f49af6825. I will check the uncreated-tail Unicode comparisons against actual filesystem aliases and Windows ordinal comparison, and check case-sensitive parent-directory behavior in a private temporary directory if the system permits it. Existing regressions, concrete counterexamples, unsupported controls and any minimal test-only patch will be reported separately. I will also compare the corresponding cases with #103, which addresses the same #55 requirement, to give an actionable reuse path. AI-assisted with Codex.Imported from uiliannn/VItoriaBr. Originally posted by lmouz823-lang on 2026-11-28T04:52:23Z.
Native Windows/NTFS audit of exact head
43077e483f2f606c7a0795823077ac4f49af6825found incorrect overlap rejections that the existing tests miss. The unchangedvictory-core --libsuite passes all 17 tests, but the new regression below fails.The component-wise
to_string_lossy().to_lowercase()comparison treats these distinct NTFS directory names as equal.İ(U+0130)i+ combining dot (U+0069 U+0307)is_withinreturns true andConfig::loadrejectsK(U+004B)K(U+212A)is_withinreturns true andConfig::loadrejectsFor each case, the public API and
Config::loadchecks ran while the configured directories were absent. Validation left the temporary parent empty. A separate creation phase confirmed the names are distinct using successful secondcreate_dircalls and canonicalization. The ASCIIcache/CACHEand accenteddepósito/DEPÓSITOcontrols correctly collide and are rejected.There is also a case-sensitive-directory issue. I successfully enabled and queried the case-sensitive flag on a new, private, empty temporary directory (
fsutilreturned 0 for both operations), then verified thatprobeandPROBEdiffer there. With missingcacheandCACHE/savespaths beneath that parent, #61 still returnsis_within = trueand rejects the configuration. The parent remained empty after validation.I ran the identical external probe source and dependency lock against #103 at
8c7eb1ea64a7955550e6cf24f77212b39622812b. That implementation returns false and accepts these independent paths for both Unicode cases and the case-sensitive-parent control. It still rejects the true ASCII/accented aliases. This comparison covers those controls and the one new exact regression.The attached 34-line test-only regression derives the expected identity from actual directory creation, cross-checks canonicalization, removes its own probe directories, asserts the configured tails are absent, and calls
is_within. It fails on #61 at the dotted-I pair withleft: true, right: false(exit 101), and the same test passes when temporarily added to the #103 head. #103 was then restored to its clean source. The proposed #61 diff contains only this regression. Changed-file rustfmt, package Clippy with-D warnings, andgit diff --checkpass.Please consider reusing or coordinating with #103's existing Windows ordinal comparison and ancestor case-sensitivity handling for #55. These observations were made on Windows 11/NTFS with Rust 1.98.1. No proposed filesystem controls were skipped, including the case-sensitive-directory setup, and both exact regression runs have zero ignored tests. Other filesystems and non-Windows behavior remain outside this focused audit.
Microsoft documents that
CompareStringOrdinalwith ignore-case uses the OS uppercase table, and Windows supports per-directory case-sensitivity flags. CompareStringOrdinal, case sensitivity.Run the added regression with the command below.
AI assistance from Codex covered the audit, synthetic probe, regression and report.
Minimal failing regression against this PR head
Pull request closed