fix(bench): canonicalise paths in cross-tool diff (trailing dir slash)#392
Open
githubrobbi wants to merge 1 commit into
Open
fix(bench): canonicalise paths in cross-tool diff (trailing dir slash)#392githubrobbi wants to merge 1 commit into
githubrobbi wants to merge 1 commit into
Conversation
cross-tool-benchmark.rs compared each tool's raw output, but uffs.com (C++) emits a trailing \ on directories while Everything and UFFS-Rust do not, so every directory hit became a spurious only-in-cpp / only-in-es pair (the bulk of the reported 11226 / 3736 diff was just c:\dir\ vs c:\dir). - canon_path(): /->\, lowercase, strip a trailing separator; drive-root guard keeps c: / c:\ / c:\\ all collapsing to c:\ (never degrades to c:). - first_csv_field(): quote-aware first-field extraction so a path containing a comma stays one field (the old naive comma split mis-parsed those). - normalise_paths() now uses both; the real cross-tool residual (cpp enumerates more rows; es has the ~2GB IPC export cap) is no longer buried under slash noise. 5 unit tests incl. a regression that reconstructs the exact cpp-vs-es mismatch and asserts an empty diff. Compiles native + cargo xwin (Windows) target. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
cross-tool-benchmark.rscompared each tool's raw output, but uffs.com (C++) emits a trailing\on directories while Everything (es) and UFFS-Rust do not. Every directory hit became a spurious only-in-cpp / only-in-es pair — the bulk of the reported11226 / 3736diff was justc:\dir\vsc:\dir.Fix
canon_path()—/→\, lowercase, strip a trailing separator; drive-root guard keepsc:/c:\/c:\\all collapsing toc:\(neverc:).first_csv_field()— quote-aware first-field extraction so a path containing a comma stays one field (the old naive comma split mis-parsed those).normalise_paths()now uses both. The real cross-tool residual (cpp enumerates more rows;eshas the ~2 GB IPC export cap) is no longer buried under slash noise.Tests
5 unit tests incl.
trailing_slash_difference_no_longer_creates_false_diffswhich reconstructs the exact cpp-vs-es mismatch and asserts an empty diff. Compiles native andcargo xwin(Windows) target.🤖 Generated with Claude Code