FA-75185 / CRDT convergence / Member archive
Visible index translation: negative delete indices wrap to the end · case 05
A delete at index minus one silently removes the last visible character.
Case contract
A sequence CRDT holds [id, char, deleted]. Local edits use visible indices: ["insert", i, ch] (0 <= i <= visible length) references the visible element at i-1 (None at 0), is placed immediately after it, and gets id "L<k>" from a counter advanced only by accepted inserts; ["delete", i] (0 <= i < visible length) tombstones the visible element at i. Out-of-range edits yield ["reject", i]. Return the emitted ops and visible text.
Why this case matters
Editors translate cursor positions into identifier-based CRDT operations; tombstones make that translation error-prone.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| out-of-range edits are rejected | {"ops": [["reject", 8], ["reject", 2], ["del", "e1"], ["reject", -1], ["ins", "L1", "e0"]], "text": "ak"} | {"ops": [["reject", 8], ["reject", 2], ["reject", -1], ["reject", -1], ["ins", "L1", "e0"]], "text": "akb"} | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗