Native Automerge Repo WebSocket sync (/automerge) and UC1–UC3 tests#48
Open
depatchedmode wants to merge 1 commit into
Open
Native Automerge Repo WebSocket sync (/automerge) and UC1–UC3 tests#48depatchedmode wants to merge 1 commit into
depatchedmode wants to merge 1 commit into
Conversation
- Split WS upgrade: legacy JSON snapshots on /, WebSocketServerAdapter on /automerge - Register adapter with store repo after init; workspace-only shareConfig for remote peers - Add test/sync-use-cases.test.js (UC1–UC3); extend test:gaps; point GAP1 at native URL - Use --test-force-exit in npm test so adapter keep-alive timers do not hang the runner - Document dual WS paths and merge semantics in README; include multi-replica plan in repo Co-authored-by: depatchedmode <depatchedmode@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements native Automerge Repo WebSocket sync on the sync server so peers using
WebSocketClientAdaptercan load the workspace document via CBOR, closing the gap described in #26 and GAP 1.What changed
MC_WS_PORTafter auth:/— existing JSON snapshot protocol for the Vite dev UI (unchanged behavior)./automerge—WebSocketServerAdapterfor@automerge/automerge-repoclients; use?ticket=from/automerge/ws-ticket(same as UI).AutomergeStore:shareConfigrestricts remote sync to the current workspace document id only (no broad document sharing).test/sync-use-cases.test.jscovers UC1–UC3; GAP 1 usesnativeAutomergeWsUrl.npm run test:gapsruns both files.npm test: adds--test-force-exitso the adapter’s keep-alive interval does not hang the Node test runner..cursor/plans/multi-replica-sync-roadmap.plan.mdfor traceability.Verification
npm testnpm run test:gapsNotes / follow-ups
mc, harness) remain LWW at the HTTP boundary; true concurrent merge is via peerRepo+/automerge.