Repository navigation
fix(native): preserve leading U+FEFF in Apple metadata names - #4730
Conversation
Codex Review SummaryThis 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 PR appears safe to merge; no blocking defects were found. SummaryPreserves leading U+FEFF in Apple metadata names at the shared C-string reader.
Reviews (4) · Last reviewed commit: "chore: merge upstream and repair keyed a..." · Reviewed by Greptile |
|
I appreciate this fix, @ShuaixinHuang. Preserving a leading U+FEFF in Apple metadata names protects the actual class, selector, and property identity at the decoder boundary, including names made only of that character. |
Problem and outcome
The Apple metadata C-string decoder removed an initial U+FEFF, changing class, selector and property identities. A U+FEFF-only class was incorrectly rejected as empty. Preserve every code point with
ignoreBOM: trueon the existing shared fatal UTF-8 reader; invalid UTF-8 and genuinely empty names retain their partial-result handling.This fixes the producing boundary used by Objective-C facets and Swift metadata/vtables, without downstream name repair or a schema change.
Validation
Head
7200ffad6b17b5231a17cfa9e8da1d4ceb682573, normally merged upstream78cf6100; pinned Node 24.18.0/npm 11.16.0.8c0021b0: 62/62 passed across file-backed metadata, Apple metadata, Swift vtables and upstream descriptor-cleanup regression files. The tests use the required caller-owned scope, including awaited cleanup.7200ffadhead passed 10 property CLI + 5 file-backed cases, zero skips, and all 10 compiler/link-mode Objective-C/Swift CLI/MCP fixtures.npm run check6/6 plus module-boundary/architecture guards passed; the two compiled keyed-archive CLI/MCP integration cases passed 2/2;git diff --checkpassed. Only the upstream test'scall(...)formatting was additionally corrected to unblock CI; no assertions were changed.The 10 property CLI cases are now selected by the macOS Apple CI job and own their CI scope. Current-head CI required passed. Its real macOS Apple lane passed 254 tests / 4 platform skips, including all 10 property CLI cases; the independent exact-source 15/15, zero-skip run above is also complete. Previous failed static runs are not presented as passing; their API-arity and upstream formatting causes have been repaired.
Fixtures include source-owned Mach-O bytes and real host-compiled Objective-C/Swift binaries. Compilation and static inspection do not execute the compiled targets (
target_executed: false). Prepared with AI assistance.Author readiness
Human owner: @ShuaixinHuang