Skip to content

Move materialization write ids to changes#160

Merged
Antonov548 merged 1 commit into
mainfrom
materialization-change-source
May 22, 2026
Merged

Move materialization write ids to changes#160
Antonov548 merged 1 commit into
mainfrom
materialization-change-source

Conversation

@marcus-pousette
Copy link
Copy Markdown
Collaborator

@marcus-pousette marcus-pousette commented May 22, 2026

Summary

  • move local materialization write ids from event.writeIds to each affected change's source.writeIds
  • keep operation source metadata on the same per-change source object
  • strip per-change write ids before broadcasting materialization events to peer browser clients
  • update conformance and sync write-id tests

Example

Before:

{
  headSeq: 42,
  writeIds: ['local-write-1'],
  changes: [
    { kind: 'insert', node: 'a', source: { operation } },
    { kind: 'payload', node: 'b', source: { operation } },
  ],
}

After:

{
  headSeq: 42,
  changes: [
    { kind: 'insert', node: 'a', source: { operation, writeIds: ['local-write-1'] } },
    { kind: 'payload', node: 'b', source: { operation, writeIds: ['local-write-1'] } },
  ],
}

@marcus-pousette marcus-pousette force-pushed the materialization-change-source branch from 311d045 to 2f864ec Compare May 22, 2026 13:41
@Antonov548 Antonov548 merged commit 2b3ffec into main May 22, 2026
3 checks passed
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.

2 participants