%ELO adaptor mislabels deltas as snapshots and strips version vectors

Open
#15 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
rust

Research direction

Start in rust/loro-websocket-client/src/lib.rs:1114-1155 and read protocol-e2ee.md for the DeltaSpan requirements. Trace local update export and initial join handling, then verify that deltas carry peerId/start/end and the document version vector, while genuine snapshots remain limited to ExportMode::Snapshot and per-peer counters advance correctly.

Written by the indexing model from the issue text.

Description

bug

rust/loro-websocket-client/src/lib.rs:1114-1155

  • Each local update is wrapped as an “Snapshot” record with vvCount = 0, even though the payload is just a
    delta blob. That violates protocol-e2ee.md (DeltaSpan must carry peerId/start/end) and prevents receivers
    or the server from deduplicating or backfilling.
  • Initial join also sends a full snapshot regardless of negotiated version, re-emitting an empty VV that
    hides actual counters.
  • Fix: When exporting CRDT deltas, build a DeltaSpan header with peerId/start/end, include the doc’s version
    vector, and only emit genuine snapshots when exporting ExportMode::Snapshot. Ensure the adaptor stores and
    increments counters per peer so version negotiation works cross-language.
Dominant language
TypeScript
Stars
38
Forks
11
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from loro-dev/protocol

All issues in loro-dev/protocol

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.