Skip to content

Add partial message merge support for datastream entities#97

Open
dontlaugh wants to merge 2 commits intomainfrom
partials-schy-230
Open

Add partial message merge support for datastream entities#97
dontlaugh wants to merge 2 commits intomainfrom
partials-schy-230

Conversation

@dontlaugh
Copy link

Port the merge package from schematic-go (PR #140) to handle
MessageType.PARTIAL updates. Instead of replacing cached entities
wholesale, partial messages now merge only the fields present in the
update: keys and credit_balances are dictionary-merged, metrics are
upserted by (event_subtype, period, month_reset), and all other fields
are replaced. Updates existing test that documented the old broken
behavior to verify fields are now correctly preserved.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

dontlaugh and others added 2 commits March 26, 2026 13:12
Port the merge package from schematic-go (PR #140) to handle
MessageType.PARTIAL updates. Instead of replacing cached entities
wholesale, partial messages now merge only the fields present in the
update: keys and credit_balances are dictionary-merged, metrics are
upserted by (event_subtype, period, month_reset), and all other fields
are replaced. Updates existing test that documented the old broken
behavior to verify fields are now correctly preserved.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dontlaugh dontlaugh marked this pull request as ready for review March 26, 2026 17:12
@dontlaugh dontlaugh requested a review from a team as a code owner March 26, 2026 17:12
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