test: pin the collapse of a symbol-keyed operator - #17
Merged
Conversation
DELETE is interpreted at any merged object-field position, including an own enumerable symbol key. Classifying a delta by its string keys alone therefore reads a symbol-keyed DELETE as an empty container and materializes one, which over a wrong-shaped base replaces a live value the miss never wrote. Nothing pinned that: symbols were covered for merging and for tombstone purity, but never as the key carrying a delete that finds nothing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
DELETEis interpreted at any merged object-field position, including an ownenumerable symbol key. Classifying a delta by its string keys alone therefore
reads a symbol-keyed
DELETEas an empty container and materializes one, whichover a wrong-shaped base replaces a live value the miss never wrote.
Symbols were already covered for merging and for tombstone purity, but never as
the key carrying a delete that finds nothing.
Non-vacuity: changing
mentioned = truetoif (typeof key === "string") mentioned = true;insrc/merge.tskills this test and nothing else inmerge.test.ts.🤖 Generated with Claude Code
Summary by cubic
Pins merge semantics for a symbol-keyed
DELETE: when the operator targets a missing symbol key, it collapses and leaves the base unchanged instead of materializing an empty object that could replace a live value. Previously, classifying deltas by string keys could misread a symbol-keyedDELETEas an empty container.test/merge.test.tsthat asserts collapse on an absent symbol key and preserves a wrong-shaped base.Written for commit 12dc9a9. Summary will update on new commits.