Repository navigation
fix(artifacts): preserve NIB field and class identities - #2106
Merged
Merged
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. |
1NormalGuy
force-pushed
the
fix/nib-field-identities
branch
from
October 12, 2026 14:56
3bd53e6 to
1a1667b
Compare
Owner
|
@greptileai review |
Contributor
|
9 tasks done
3 tasks done
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.
Summary
Preserve literal NIBArchive field and class names in Interface Builder evidence. Two data-loss defects were reproduced against upstream
0d5033ad1; no related issue was found.Problem and expected behavior
A serialized
__proto__field was assigned through an ordinary object's inherited setter, so it disappeared from the result. Separately, the UTF-8 decoder stripped an initial U+FEFF from length-prefixed keys and class names. Distinct keysenabledand\uFEFFenabledconsequently collapsed, with the second value overwriting the first.For the regression fixture, both public adapters previously returned
nibValues: { constructor: 7, enabled: false }. They now retain__proto__: { objectID: "1" },constructor: 7,enabled: true, and\uFEFFenabled: false, as well as the exact\uFEFFCustomViewclass name and a numeric__proto__field on the second object.Change and scope
Create own data properties at the NIB field-decoding boundary and disable BOM consumption for the format's length-prefixed UTF-8 names. Malformed UTF-8 remains rejected. The graph projection already uses
Object.fromEntries, and the shared JSON-value boundary preserves literal keys, so no downstream repair is needed.Contract and boundary impact
decode-interface-builder/decode_interface_builderevidence.Evidence and regression coverage
Added a compiled CLI plus real stdio MCP acceptance workflow using a generated NIBArchive byte fixture. It covers object-valued and numeric
__proto__, distinct BOM-prefixed keys, class identity, adapter parity and source integrity.The new workflow failed on the unmodified base with the missing and overwritten fields shown above, then passed after the fix.
Native Xcode production of these unusual names was not verified; the new regression uses the existing format fixture encoder, not a simulated provider.
Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
Using Node 24.18.0 and npm 11.16.0 on macOS:
npm run test:focused -- tests/acceptance/applications/nibFieldIdentity.test.ts src/artifacts/apple/NibArchive.test.ts src/artifacts/apple/NibViewHierarchy.test.ts tests/boundary/mcp/promptCompletion.test.ts— 23 passed on the rebased branch, including CLI, stdio MCP and cold/warm prompt completion.npm run test:local -- src/artifacts/apple/NibArchive.test.ts src/artifacts/apple/NibViewHierarchy.test.ts— 16 passed.tests/boundary/filesystem/interfaceBuilderBundle.test.ts— 56 passed, 2 failed because this host lacks Xcodeibtooland its Swift compiler rejects a trailing comma in the existingkeyed-archive-hierarchy.swiftfixture. These host/toolchain gaps remain unverified; the new acceptance test passed in that run.npm run verify:test-discovery— all 916 files discovered exactly once.npm run check— passed, including typecheck, lint (0 errors), formatting, module boundaries and architecture guards.npm run verify:package— passed on macOS arm64, including packaged MCP prompt completion and lifecycle. Local loopback addresses were excluded from this host's HTTP proxy.git diff --check— passed.e4d3e1399; the prior CI failures in prompt completion and macOS packaged smoke were corrected upstream by621cee192andfe4b94a66.Compatibility, safety, and release
Review checklist