Skip to content

test: pin the collapse of a symbol-keyed operator - #17

Merged
b2m9 merged 1 commit into
mainfrom
test/symbol-keyed-operator-collapse
Aug 13, 2026
Merged

test: pin the collapse of a symbol-keyed operator#17
b2m9 merged 1 commit into
mainfrom
test/symbol-keyed-operator-collapse

Conversation

@b2m9

@b2m9 b2m9 commented Aug 13, 2026

Copy link
Copy Markdown
Owner

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.

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 = true to if (typeof key === "string") mentioned = true; in src/merge.ts kills this test and nothing else in
merge.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-keyed DELETE as an empty container.

  • Adds a focused test in test/merge.test.ts that asserts collapse on an absent symbol key and preserves a wrong-shaped base.
  • No production code changes or migration steps.

Written for commit 12dc9a9. Summary will update on new commits.

Review in cubic

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>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@b2m9
b2m9 merged commit ae003c6 into main Aug 13, 2026
3 checks passed
@b2m9
b2m9 deleted the test/symbol-keyed-operator-collapse branch August 13, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant