test: enforce native relative coverage#52
Merged
Conversation
Merging this PR will degrade performance by 11.4%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | string |
226.7 ns | 255.8 ns | -11.4% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing agent/semantic-test-matrix (bc69528) with main (8a3aeac)
Footnotes
-
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. ↩
9accf28 to
1f5f7a1
Compare
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
relative_with, including borrowed and owned cwd arguments, mixed absolute/relative inputs, dirty spelling, root clamping, trailing separators, root-relative paths, drive-relative paths, and different-drive fallbackrelative,try_relative, andrelative_withvalue andCowcontracts, including receiver-only borrowing when base and cwd are owned temporariesrelative_strdispatch as well as the specialized helpercfgchange cannot silently become a zero-test successsugar_pathpackage alone so the allocation tracker'scached_current_dirdependency cannot enable that feature through workspace feature unificationcached_current_dirstate, with an executable sentinel that fails if Cargo feature unification makes the two configurations identicalWhy
The existing cwd-dependent tests sometimes used
relative_withas the expected result for ambientrelative, so a shared mistake could remain self-consistent. The exhaustive macOS/Linux test called the specialized private helper directly, which did not prove that production dispatch still selected the intended implementation. In addition, the*-latestCI labels did not fail if a runner architecture changed and compiled every relevant test away.An adversarial review of the follow-up cache matrix found that
cargo test --workspacewas not a true default-feature run: the allocation tracker enablescached_current_dir, and Cargo unified that feature into the main crate. Selecting-p sugar_pathmakes the default and all-feature jobs exercise distinct configurations. Because the cache tests adapt their expected result throughcfg!(feature = "cached_current_dir"), they would not detect a future regression back to the workspace command; the new feature sentinel makes the intended off/on pair executable.Impact
This changes no production algorithm, public API, benchmark, or allocation snapshot. The only
srcchanges are inside a#[cfg(test)]module. The PR makes missing native coverage fail explicitly and keeps the independently reviewed slash-policy, Windows encoded-root, absolutization, cache, and owned-normalization follow-ups current in the testing-strategy record.Validation
cargo +1.97.0 fmt --all --checkcargo +1.97.0 clippy --locked --workspace --all-targets --all-features -- -D warningsRUSTDOCFLAGS="-D warnings" cargo +1.97.0 doc --locked --workspace --all-features --no-depsSUGAR_PATH_EXPECT_CACHED_CURRENT_DIR=0 cargo +1.97.0 test --locked -p sugar_pathSUGAR_PATH_EXPECT_CACHED_CURRENT_DIR=1 cargo +1.97.0 test --locked --workspace --all-featuresx86_64-pc-windows-msvcThe branch is rebased onto merged PRs #56 and #57. The cached-cwd and owned-normalization entries now point to those merged checkpoints, while PRs #53–#55 remain independent Drafts.
Hosted CI at
bc69528passes all eight repository jobs. The logs confirm that the Linux, native Windows MSVC, and macOS ARM64 jobs execute the distinct default/all-feature configurations and their platform sentinels. The macOS job verifies theaarch64-apple-darwinhost and NEON availability. The external CodSpeed analysis reports onlyas_path/rolldown_corpus/stringat 226.7→255.8 ns while warning that runtime environments differ; this branch changes no production, dependency, benchmark, or benchmark input, and the same pair has previously appeared in the opposite direction.