fix: preserve literal path identity during normalization - #48
Open
flyingrobots wants to merge 2 commits into
Open
flyingrobots wants to merge 2 commits into
flyingrobots wants to merge 2 commits into
Conversation
RED: bash test/literal-paths.sh reported 90 passed and 150 failed. The failures cover claim, batch, read, prefix, nested, one-match, multi-match, and seed 320032 across 64 deterministic stress cases.
Split path components with read -a before applying lexical normalization so Bash never expands *, ?, or bracket expressions against the working tree. Rebuild the executable and document the contract.\n\nGREEN: bash test/literal-paths.sh reported 240 passed and 0 failed, including seed 320032 across 64 deterministic cases. make lint passed.
|
Warning Review limit reachedNext included review available in 38 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
flyingrobots
marked this pull request as ready for review
September 22, 2026 16:14
10 tasks
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.
A quoted path such as
report[1].mdcould reserve an existingreport1.mdbecause normalization expanded glob characters. Split path components into an array and iterate quoted elements so literal*,?, and brackets retain their identity regardless of checkout contents.Fixes #32.
Validation: the focused regressions failed against the original implementation (90 passed, 150 failed) and pass with the fix (240 passed), including a 64-case deterministic corpus at seed 320032. Cases cover contention on the literal filename, freedom of neighboring filenames, nested and prefix paths, batch input, and existing normalization boundaries. The normal pre-push gate passed all 452 base assertions and 240 focused assertions; commit lint and GitHub CI passed at
77b59079cc42f3f078c68d50e9c46755e78723ab.Runtime remains Bash/Git only. Earlier validation interrupted by host disk exhaustion is excluded from the successful results above.