Repository navigation
Conversation
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.
Reproduction
An invalid-UTF-8 entry and a sibling named with a literal U+FFFD share the same display name in the scan tree. A scan-derived-path test against origin/main (not included here) deleted the literal sibling and failed with
lossy scanned path removed the literal U+FFFD sibling. A directory variant derives a child path through the ambiguous intermediate component.Fix
Refuse any removal path containing U+FFFD with a clear lossy-filename error. This avoids storing native names per node (
Nodeis size-tested). The tests keep the original collision scenario, cover ambiguous intermediate directories, and prove an ordinary non-ASCII name (café) still plans and is removed through normal dispatch while an unmarked witness survives.Checks run
The three exact core regressions each passed (1 passed).
cargo xtask lintpassed.cargo xtask testpassed: 72 app, 143 core (2 ignored), 3 xtask.Limitations
The policy deliberately refuses literal U+FFFD names, and descendants of a U+FFFD-named root, too. Exact byte identity would need native names in the tree and is left for a larger change. The invalid-byte fixtures are Unix-only; Windows:
cargo check -p disktree-core --target x86_64-pc-windows-msvc --testspasses; nothing was run on Windows.Developed with AI assistance (OMP agents). I reviewed the diffs; every check listed was run on the final branch.