Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis 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. |
[Medium impact] The PR appears safe to merge; no blocking code issues were found. SummaryThe shortcut parser rejects string offsets into structure headers and keeps target claims unknown when declared path data cannot be read.
No new actionable issues found. Both earlier review concerns are addressed. Review was source-based; tests were not rerun. Reviews (6) · Last reviewed commit: "merge(windows): integrate shortcut offse..." · Reviewed by Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5fc4ce4466
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Keep LinkInfo, VolumeID, and network string offsets inside structure data while retaining main's ANSI path identity, StringData limits, and TerminalBlock coverage.
Summary
Reject Shell Link string offsets that point into LinkInfo or nested structure headers.
Problem and expected behavior
The LinkInfo offsets for ANSI and Unicode paths identify data following the declared header. If LocalBasePathOffset points to the header-size field, the parser currently reads the header byte as a path and reports complete coverage. The offset must identify the path field within LinkInfo. MS-SHLLINK §2.3
Volume labels and network names also live after their own structure headers. Offsets into those headers previously produced header bytes as labels or names with complete coverage. See VolumeID and CommonNetworkRelativeLink.
Change and scope
Bound string offsets by their LinkInfo, VolumeID, or network header and report an issue at the offending offset field. Keep later structures and readable sibling fields. An unreadable declared target leaves a target extension or mismatch unknown unless another complete independent target matches the icon.
Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.
For evidence-bearing changes:
Validation performed
Review follow-up: complete target candidates retain their own local, network and suffix completeness. An unreadable component cannot turn a bare base or ANSI fallback into a definite match; a separate complete target can still match. Three selected cases failed and three passed on the prior head; all six passed after the fix (72 name-deselected). The parser/service suite passed 85 tests.
On the prior head and this revision, the compiled CLI and named MCP SDK each inspected the same seven authored shortcuts (same path, hash and bytes), with input/output schema validation and connection close. Four incomplete candidates changed from a false match to unknown; a valid target and two independent-match controls retained their results. The valid control's normalized output was unchanged.
Current nested structure offsets: 6 selected cases failed before the change and passed after (61 name-deselected). All 78 parser/service tests passed, including the existing truncated Unicode-header recovery and controls for target comparison uncertainty.
On the prior PR head
11345aa26f7a873c47c61e4474ea8b4bfe670b28, the compiled CLI and named MCP SDK each read the same six malformed synthetic files and two valid controls; the malformed values were control bytes with complete coverage. After the change, both interfaces return partial coverage and null for the affected field; both valid controls retain identical normalized reports. Named schemas and client close were checked. Three additional CLI/MCP cases cover unknown target, known match and valid Unicode fallback. The nested parser was unchanged between the original base and main5815178a8d581fa81a9422cdfb9f86dd5cb913d7.Review follow-up: both ANSI and Unicode common-path suffix offsets into the LinkInfo header are covered. With their lower-bound checks temporarily removed, the two selected tests failed; after restoring the production checks, both passed (59 tests deselected). The parser and service suite passed 67 tests.
Two targeted parser cases failed on the baseline and passed on the candidate. All 65 focused parser and service tests passed.
The compiled CLI and production MCP SDK each handled the same three files on both revisions. Checked ToolDefinition, JSON Schema 2020-12, report shape, source hashes, offsets and MCP client close.
Build, formatting, Git diff checks and normal commit and pre-push checks passed.
Compatibility, safety, and release
Author readiness
Human owner: @wunianze666-netizen
Before merge
type(scope): outcome.