Repository navigation
fix(windows): preserve opaque ANSI shortcut path identity - #10547
ShuaixinHuang wants to merge 1 commit into
Conversation
Reapply the focused fix from morluto#10181 on current main at the author's request; preserves prior review history through the replacement PR.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The reviewed changes appear safe to merge. SummaryThe PR keeps opaque ANSI shortcut bytes out of Unicode path comparisons.
ShuaixinHuang explicitly documents opaque ANSI joins remaining unknown as intentional; this was not treated as a regression. The security review found no actionable issue in the changed code. Review conclusions are source-based; no tests were run during this review. Replacement status could not be independently checked because GitHub authentication was unavailable. The supplied description says this PR replaces #10181 at ShuaixinHuang’s request. Reviews (1) · Last reviewed commit: "fix(windows): preserve opaque ANSI short..." · Reviewed by Greptile |
|
Reviewed The safety property holds. Across 30 target/icon pairs (ASCII, Two things I confirmed rather than assumed:
Beyond the diff, the One observation, not a defect: On CI: the only failing required check is |
Replacement history and current scope
Replaces #10181 at the author's explicit request, on current main
fe80d52c9(head31cabe96d). This is the same defect and contribution, not a new independent finding. The original PR preserves its complete review/CI history. Only the focused four-file fix is carried forward.Trigger, root cause, and fix
Shell Link ANSI fields are stored as byte-preserving Latin1 projections while the original Windows ANSI code page is unknown. Applying Unicode lowercasing or path normalization to these projections can invent equality or difference: CP932 bytes
83 41and83 61name ア and ヂ, while82 60and82 81name A and a;83 5ccontains a trail byte that resembles a backslash.The path-fact owner preserves opaque ANSI identity, certain identical-byte/ASCII-tail comparisons, and unknown full-path joins where multibyte boundaries are unobserved. A known suffix extension remains reportable; non-ASCII ANSI extension text stays unknown. Raw fields, exact artifact identity, Unicode controls and supported ASCII observations are retained through CLI/MCP. No host-code-page guess, new schema, provider, target execution or installation behavior is added.
Related work
Merged #9691 handles mixed ANSI/Unicode comparisons; this defect concerns opaque ANSI bytes even when both fields are ANSI. Open #10416 validates offsets and unreadable declarations, a different root; its patch does not establish multibyte character identity. Main's flag/unterminated-field handling is preserved.
Current-base verification
Linux x64, Node 24.22.1 / npm 11.16.0:
fe80d52c9production: 10 failed / 62 passed. The production file was restored byte-for-byte infinally.check:fast: 2 tasks passed (31.872 s). Three-file type-aware lint: 0 errors / 9 advisories. Formatting, diff review, normal commit/pre-push hooks and four post-hook input hashes passed.No native Windows/IShellLink, real original code page, complete monolithic local check or new-PR hosted-CI pass is claimed. CI is pending. The final diff was reviewed for observation certainty, shared consumers and preserved unknowns.
Author readiness
Human owner: @ShuaixinHuang
Pending confirmation for this replacement's final diff and current-base evidence; the old PR's declaration is not reused.