test: cover owned normalization contracts#57
Merged
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
hyfdev
force-pushed
the
agent/owned-normalization-contract-matrix
branch
from
July 14, 2026 13:21
39372b6 to
531ece8
Compare
hyfdev
marked this pull request as ready for review
July 14, 2026 13:21
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.
Summary
PathBuf::into_normalizedinput/output matrices for Unix and Windows instead of deriving expected values through the borrowed normalizer./inside verbatim components, and prefix-looking normal components.Why
The existing dirty owned tests call
normalize()to construct the expected value, so the borrowed and consuming APIs can agree on the same defect. Direct owned coverage otherwise protects only a small set of clean, current-directory, dirty, and invalid-component examples. This matrix fixes the expected native representation independently and exercises each behavior partition through the consuming wrapper.Impact
This adds one integration-test file. It does not change production code, public APIs, dependencies, benchmarks, allocation snapshots, or documentation. The non-UTF-8 cases assert exact bytes or wide units and idempotence only; they deliberately do not turn pointer reuse, capacity, allocation count, or latency into a semantic merge gate.
Validation
cargo +1.97.0 fmt --all --checkcargo +1.97.0 test --locked -p sugar_path --test owned_normalizationcargo +1.97.0 test --locked -p sugar_path --all-features --test owned_normalizationcargo +1.97.0 test --locked -p sugar_pathcargo +1.97.0 test --locked --workspace --all-featurescargo +1.97.0 clippy --locked --workspace --all-targets --all-features -- -D warningsRUSTDOCFLAGS='-D warnings' cargo +1.97.0 doc --locked --workspace --all-features --no-depscargo checkand Clippy forx86_64-pc-windows-msvcin a dependency-only harness without the host-incompatible allocation-tracker C dependency.wasm32-wasip1-threads.Adversarial review
dead_codeerror under WASI Clippy with warnings denied.Hosted validation
owned_receiver/string_resultrepeats 401.7 ns to 460 ns (-12.68%), whileas_path/stringrepeats 255.8 ns to 226.7 ns (+12.87%). This test-only diff changes no production source, dependency, benchmark, or benchmark input, so that comparison is not attributable to this PR.