Repository navigation
fix(reference): join internal symlink targets with the inventory NFC normalizer - #1535
Merged
morluto merged 3 commits intoOct 10, 2026
Merged
Conversation
…normalizer checkSymlinks resolved an internal symlink target with bare posix.normalize and looked the result up in the inventoried path set. A target that a filesystem reports in NFD (macOS readlink commonly does) joined to an NFD spelling while the inventory holds NFC, so validation reported "Internal symlink target must resolve to an inventoried entry" for a target the inventory actually contains. Route the join through normalizeJoinedLogicalPath, the same inventory identity normalizer morluto#1513 applied to the runtime, HTML/module, and import joins from morluto#1488. The feature-seed NFKC query fold stays a query. Refs morluto#1488
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Owner
|
Thanks @anujsingh-cse for catching the Unicode normalization issue in internal symlink lookup! Squash merged with the source-spelling preservation fix. Welcome to REA, and thank you for your first PR. |
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
checkSymlinksinsrc/domain/referenceSourceGraph.tsresolved an internal symlink target with bareposix.normalizeand looked the result up in the inventoried path set:A target a filesystem reports in NFD (macOS
readlinkcommonly does) joins to an NFD spelling while the inventory holds NFC, so validation reportedInternal symlink target must resolve to an inventoried entryfor a target the inventory actually contains — the same path-identity class #1488 describes.The three joins #1488 lists are already routed through
normalizeJoinedLogicalPath(that landed with #1513); this join was the remaining one of the class, which the issue's Where list missed.Fix
Route the symlink join through
normalizeJoinedLogicalPath, the inventory identity normalizer, exactly like the #1513 fixes. The feature-seed NFKC query fold stays a query, per the issue's expected behavior. Internal targets are already schema-constrained to relative, backslash-free, normalized spellings, so the extra normalization only adds NFC.Verification
Two new cases in a dedicated describe block (the file's main describe is at the
max-lines-per-functionlimit):cafe\u0301.ts) resolving to an NFC inventoried file (src/café.ts) now validates instead of failingThe NFC case fails on the pre-fix source (red/green confirmed locally).
Unavailable coverage: no real-provider or host lane is relevant to this validator change.
Refs #1488