fix(workspace): treat '/' and '\' as the same separator in root matching (#1718) - #1786
Open
umi008 wants to merge 1 commit into
Open
fix(workspace): treat '/' and '\' as the same separator in root matching (#1718)#1786umi008 wants to merge 1 commit into
umi008 wants to merge 1 commit into
Conversation
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
The Windows sensitive-root escape hatch broke on separator spelling: the grant is recorded from cbm_canonical_path (backslashes) while the indexer hands the candidate normalized to '/'. ws_is_ancestor_or_equal compared bytes, so an approved 'Program Files' root never matched the candidate and --approve-sensitive could not lift the refusal. Compare component boundaries with separator equivalence, consistent with ws_is_sep used everywhere else in this module. The containment rule (a separator byte is never part of a component name) is unchanged. Fixes DeusData#1718 Signed-off-by: Ulises Millan Guerrero <ulises.millanguerrero@gmail.com>
umi008
force-pushed
the
fix/issue-1718-approve-sensitive-separators
branch
from
August 22, 2026 02:06
0439845 to
8553224
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.
What does this PR do?
--approve-sensitivenever lifted the sensitive-root refusal on Windows for paths underProgram Files, because the grant is recorded fromcbm_canonical_path(backslashes) while the indexer hands the candidate already normalized to/.ws_is_ancestor_or_equalcompared the raw bytes, so the recorded grant never matched the candidate and the escape hatch stayed dead exactly where it is needed most.The comparison now treats
/and\as the same separator on the component boundary, consistent withws_is_sepeverywhere else in this module. The containment rule (a separator byte is never part of a component name) is unchanged.The
ws_paths_equalhome-directory rule incbm_workspace_classify_rootuses the same helper, so home detection becomes robust to separator spelling as well. No classification semantics changed beyond separator equivalence.Checklist
git commit -s) — required, CI rejects unsigned commits (DCO, see CONTRIBUTING.md)make -f Makefile.cbm test)make -f Makefile.cbm lint-ci)