Undo can restore sequence items with unreachable right origins
Undo restoration can select both a left and right origin that no longer define a reachable insertion interval after nested sequence edits. The restored item can then encode a right origin that is not reachable from its left origin, which can break fresh decoding or peer convergence.
This affects both the current main branch and v13.
I have patches with regression coverage for nested sequence undo round trips, fresh serialization, and collaborator convergence. The main-branch coverage also exercises a snapshot-rendered insertion. The fix verifies that the selected right origin remains reachable by walking rightward from the selected left origin; when it is not, restoration falls back to the immediate right neighbor before integrating the item.
I will send separate PRs for main and v13 that reference this issue.
Source: yjs/yjs