Per the grounding contract in Theorem/docs/spec-0-crdt-substrate.md: external
protocols and CRDT semantics are lossy in model memory. This file pins what the
DB-repo lane (Parts 3/5/7 of SPEC-RUSTYRED-CRDT) binds to, so the binding is to
what is actually there, not reconstructed.
- SPEC-RUSTYRED-CRDT.md (the execution handoff being built) supersedes the
op-based four-set framing in
Theorem/docs/spec-0-crdt-substrate.md: it picks a delta-state CRDT over the typed graph, HLC clocks,yrs, and reuse ofversioned_graph'sAutoConfidenceconfidence-merge. spec-0 SC-A1..A4 are satisfied by the Downloads-spec acceptance (add-wins via the existingEdgeRecord.tombstone, not a 2P-set). Build to the Downloads spec; map tests back to spec-0 success criteria.
- yrs = 0.27.0 (
Cargo.lock; declaredyrs = "0.27"incrates/rustyred-server/Cargo.toml). The deployedyjs_sync.rsbinds to it. Part 5 extends that binding (code buffers, per-span provenance, awareness). The yrs version is the authority for the provenance representation and the awareness frame; API confirmed by compiling against this exact version.
- The
yjs_sync.rs3-tag frame protocol (0x00PULL state-vector /0x01PULL_REPLY diff /0x02UPDATE apply+broadcast) is a deliberate 1:1 subset of the y-websocket / AFFiNE sync-gateway protocol, mapped onto BlockSuite'sDocSource. The frontend half isRustyRedDocSourcein the Open-Flint-Atlas civic-editor bundle; the shared contract is the planner folder's SCHEMA-CONTRACT.md. Part 5 adds0x03AWARENESS (broadcast-only, never persisted). Part 3 mirrors the same 3-tag shape for graph deltas at/v1/tenants/:tenant_id/sync/graph/:room_id.
The two trees have separate clean-room cores (rustyred-thg-core in Theorem,
rustyred-core here). StampedBatch / StampedMutation / VersionVector
authored by Codex in rustyred-thg-core/src/crdt/merge.rs are ported verbatim
into this repo's rustyred-core for the Part 3 transport. Encoding: serde_json,
matching the existing GraphMutationBatch write path. Wire shape to be frozen by
Codex once merge.rs compiles; recorded in coordination room room:crdt-substrate
decision record_a05847db14d39d04.