Repository navigation
fix(javascript): respect object property overwrite order - #671
Closed
rudycelekli wants to merge 2 commits into
Closed
rudycelekli wants to merge 2 commits into
rudycelekli wants to merge 2 commits into
Conversation
added 2 commits
October 6, 2026 02:07
Signed-off-by: RudyCelekli <[email protected]>
Signed-off-by: RudyCelekli <[email protected]>
morluto
approved these changes
Oct 6, 2026
morluto
left a comment
Owner
There was a problem hiding this comment.
Approve: object literals are last-wins with deterministic compareCodePoints order; spreads/unknown-computed/proto-setter invalidate earlier exacts while later exacts restore. Correctly handles literal computed keys, methods/accessors, and proto shorthand. Dataflow tests + export-shape trailing-spread lock covered. Checks green.
Owner
|
Superseded by #705, which cherry-picks this change (plus 13 sibling fixes) onto current main with conflict resolution and regenerated catalogs. Closing to keep one reviewable merge unit. |
Owner
|
Thanks, @rudycelekli, for your work on “fix(javascript): respect object property overwrite order.” I appreciate your contribution to REA. |
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.
What changed
Object-literal value recovery now follows declaration order: the last named key wins; an unknown spread or computed key invalidates earlier exact values; a later named assignment can restore an exact value. Methods/accessors replace a prior primitive with an unknown value. Literal computed keys remain usable. A non-shorthand
__proto__setter is excluded from own-property evidence, while{ __proto__ }shorthand remains an own property.Consumer evidence
On an owned application file, the complete built public
analyzeJavaScriptApplicationworkflow previously emitted"old"for{ key: "old", key: "new" }.key; native Node emits"new". After the repair, the serialized graph reports the final value and a later post-spread override. Unknown-spread and dynamic-key values are retained as unknown instead of falsely exact; the native shorthand__proto__control also agrees.Verification
/depthunknown assertion; a separate trailing-spread case verifies two unpaired unknown variants and no definite changes.npm run check,npm run check:fast,npm run build:cached— passed.type, while a post-spreadtyperemains guaranteed.git diff --check— passed.The initial hosted shard 3 failure was an existing comparison fixture assuming the pre-spread discriminator stayed exact. Its corrected fixtures and added consumer regression passed locally; all 18 hosted checks on updated head
0622582e169fe3d4c226eac457b27f354fb03a07passed, including all four shards and aggregate coverage.No new tool, schema, or execution authority. This is conservative static analysis, not an object evaluator. Hopper/Ghidra verification was not run because no binary provider behavior changes. AI assistance was used for investigation, implementation and verification.