SPEC-003: realtime collaborative editing via p2p CRDTs #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/3/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Spec (v1.1.0) + implementation of multiplayer editing: Loro CRDT edit document, iroh transport + blob-integrity sync, serverless pkarr/Mainline-DHT discovery, SPAKE2 pairing over iroh, and a session daemon. 38 tests passing. Details in plans/IMPL-003-STATUS.md. Intentional gates: SPAKE2 crypto review (ADR-009), real-DHT round-trip (OQ-7), daemon lifecycle/remote-sync wiring (OQ-8).
Review issues addressed —
9ae2ec1All five points fixed, each with a regression test. Full transport-feature suite (34 tests) passes under rustc 1.93; vault clean.
CollabDoc::import()now advancesnote_counterpast this actor's existing note ids (sync_note_counter), so a reloaded doc (sameActorId) never reusesactor:00000000and overwrites a notenotes_survive_reload_same_actorfetch_blobstreams chunks and hashes incrementally (BLAKE3 verified streaming) instead ofread_to_end(512 MiB)— multi-GB sources transferdaemoncommand body is#[cfg(unix)]and returns an unsupported-platform error on non-unix;shell::daemonstays Unix-gatedcargo check -p ar-editparse_recordrestores therelay=attribute viawith_relay_url, so a relay-only (WAN/NAT) host stays dialablerecord_preserves_relay_urlMAX_SYNC_FRAME(64 MiB) instead of the 64 KiB control-frame cap; real snapshots/offline batches parsesync_envelope_allows_large_payload(128 KiB)Spec updated to match (CON-015 cap, REQ-075 streaming). Two iroh-API corrections surfaced during the build and were fixed:
RecvStream::read_chunkreturnsOption<Bytes>(not aChunk), andSecretKey::generate()takes no args.Review round 2 addressed —
6935489All five points fixed with regression tests. Full collab matrix: 43 tests pass (rustc 1.93).
add_new_shotmints an actor-scoped id for live inserts (no cross-replica collision);add_shotdisambiguates a local duplicate instead of overwriting;shot_counterrestored on importgenerated_shot_ids_avoid_collision_across_replicas,add_shot_disambiguates_local_duplicate_idfrom_event_sourced(ed, actor)migrates under a fixed peer id (idempotent across independent migrations) then re-keys to the caller's node actor for later edits (rekey_actor)independent_migrations_converge_without_duplicationbind()probes first and refuses (AlreadyRunning) if a live daemon answers; removes only a proven-stale socketdaemon_refuses_when_already_runningwaiter_freed_on_disconnectSpec updated to match (REQ-080 generated ids, REQ-088 fixed-actor migrate + re-key, REQ-089 refuse-if-running, CON-014 free/buffer).
Pull request closed