Skip to content

test: cover Windows encoded roots#54

Merged
hyfdev merged 1 commit into
mainfrom
agent/windows-encoded-root-matrix
Jul 14, 2026
Merged

test: cover Windows encoded roots#54
hyfdev merged 1 commit into
mainfrom
agent/windows-encoded-root-matrix

Conversation

@hyfdev

@hyfdev hyfdev commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • cover all six Windows root-identifier comparison slots that can contain arbitrary native encoding: UNC server/share, verbatim UNC server/share, DeviceNS, and generic verbatim names
  • prove public relative APIs fold ASCII case only, distinguish lone surrogate units that have the same lossy rendering, do not apply Unicode case folding, and keep DeviceNS separate from generic verbatim names
  • verify clean and dirty absolutization preserves encoded root identifiers through strict, fallible, and explicit-cwd entry points, including ordinary and root-relative receivers with borrowed and owned cwd values

The matrix first verifies the expected std::path::Prefix variant so a malformed fixture cannot silently exercise an ordinary component. Drive and verbatim-drive identifiers are intentionally excluded because Rust recognizes only ASCII alphabetic drive letters; a non-ASCII or surrogate pseudo-drive would not enter the drive-prefix comparator.

Same-root invalid-encoding results assert exact wide output without requiring Cow::Borrowed: non-UTF performance is not an optimization gate. Different-root results remain required to return the documented owned normalized target.

This PR adds one Windows-only integration test file. It does not change production code, dependencies, benchmarks, or benchmark inputs.

Validation

  • SUGAR_PATH_EXPECT_CACHED_CURRENT_DIR=0 cargo +1.97.0 test --locked -p sugar_path
  • SUGAR_PATH_EXPECT_CACHED_CURRENT_DIR=1 cargo +1.97.0 test --locked --workspace --all-features
  • cargo +1.97.0 fmt --all -- --check
  • cargo +1.97.0 clippy --locked --workspace --all-targets --all-features -- -D warnings
  • production library check and Clippy for x86_64-pc-windows-msvc
  • the changed integration test checked and linted for MSVC through a dependency-only harness, avoiding the repository dev-only mimalloc build that requires a local Windows SDK
  • two independent adversarial reviewers found an over-constrained non-UTF Cow assertion, a missing encoded-cwd root-relative branch, and a missing DeviceNS/verbatim isolation pair; all three are fixed

At the rebased head 31ed4cc, all eight repository Actions jobs and external CodSpeed Analysis pass. Native x86_64-pc-windows-msvc executes both encoded-root tests successfully under default and all features.

@codspeed-hq

codspeed-hq Bot commented Jul 14, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 228 untouched benchmarks
⏩ 38 skipped benchmarks1


Comparing agent/windows-encoded-root-matrix (31ed4cc) with main (36ea1df)

Open in CodSpeed

Footnotes

  1. 38 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@hyfdev
hyfdev force-pushed the agent/windows-encoded-root-matrix branch from ad3a697 to a6bb7a9 Compare July 14, 2026 09:51
@hyfdev
hyfdev force-pushed the agent/windows-encoded-root-matrix branch from a6bb7a9 to 31ed4cc Compare July 14, 2026 13:56
@hyfdev
hyfdev marked this pull request as ready for review July 14, 2026 14:19
Copilot AI review requested due to automatic review settings July 14, 2026 14:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@hyfdev
hyfdev merged commit f6ca8e1 into main Jul 14, 2026
9 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 14, 2026
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.

2 participants