Skip to content

playground: CRDT engine to snapshot format 8 (collab v0.37, crdt v0.39) - #125

Merged
tannevaled merged 1 commit into
mainfrom
collab-crdt-snapshot-v8
Sep 1, 2026
Merged

playground: CRDT engine to snapshot format 8 (collab v0.37, crdt v0.39)#125
tannevaled merged 1 commit into
mainfrom
collab-crdt-snapshot-v8

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Live collaboration was pinned to go-crdt/collab v0.33.0 / crdt v0.35.0 while the CRDT engine moved on. This takes the playground to collab v0.37.0 + crdt v0.39.0 — the pair that writes snapshot format version 8 (~45% smaller snapshots), and folds in the federation / eviction / read-only-participant-retention fixes from collab v0.34–v0.37.

Why the latest pair, not Renovate #115

Renovate #115 bumps to collab v0.36.1 / crdt v0.37.0 — which is before snapshot v8 (introduced in crdt v0.38.0, required by collab v0.37.0). To actually ship the smaller-snapshot win, the playground needs this pair. #115 remains for its richdoc/toolkit bumps.

Format-8 compatibility

The upgrade note warns a v0.39 server sends format 8 to joining clients and no crdt before v0.38 can read it — that is a cross-version server concern. Here both peers run the same deployed wasm build, so host and guest are always on the same format; there is no mixed-version path. Serverless signalling (paste blob / QR) and the in-memory-only token posture are unchanged.

Verification

Local: GOOS=js GOARCH=wasm go build ./..., go vet, gofmt -l, and the native collab sync suite (collab_test, collab_twotab_test, collab_localtab*, collab_panel_flow, collab_peer_identity, collab_qr, collab_paste_field) all pass on the new pair. The headless two-tab browser-proofs run in CI. Diff is playground/go.mod + go.sum only.

🤖 Generated with Claude Code

…crdt v0.39)

Live collaboration was pinned to go-crdt/collab v0.33.0 / crdt v0.35.0 while the
engine moved on. This takes it to collab v0.37.0 + crdt v0.39.0 — the pair that
writes snapshot format version 8 (a ~45% smaller snapshot), and folds in the
federation/eviction and read-only-participant retention fixes from collab
v0.34–v0.37.

The format-8 upgrade note warns that a v0.39 server sends format 8 to joining
clients and no crdt before v0.38 can read it — that is a cross-version server
concern; here both peers run the same deployed wasm build, so host and guest
are always on the same format. Serverless signalling (paste blob / QR) and the
in-memory-only credential posture are unchanged.

wasm build, go vet, gofmt and the native collab sync suite (two-tab, localtab,
handshake, peer-identity) all pass on the new pair; the headless two-tab
browser-proofs run in CI.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tannevaled
tannevaled marked this pull request as draft September 1, 2026 10:45
@tannevaled

Copy link
Copy Markdown
Contributor Author

Held as draft — this bump needs a cross-org change first.

CI's two-tab browser-proofs fail on the new pair:

  • TestCollabLocalTabConvergence: tabs connect (same-browser BroadcastChannel) but never converge — B never sees A's edit, no remote carets, buffers don't merge.
  • TestCollabLocalTabSequentialConvergence: the peers time out before reaching connected (peers:0).

Root cause: the live-sync seam is inside toolkit.CollabText (go-widgets/toolkit), whose collabtext.go consumes client.Changes() + client.TakeChanges(). toolkit v0.294.0 pins go-crdt/collab v0.33.0. Bumping the playground to collab v0.37 makes Go MVS run toolkit's CollabText against v0.37 — a version it was never written or tested against — and the v0.34–v0.37 change-notification / version-vector / collection changes break its consumption. The wasm build passes (signatures are unchanged); the break is purely semantic, which is why only the browser-proofs catch it.

Blocker: go-widgets/toolkit's CollabText must be updated to collab v0.37 (snapshot format 8) and released, then the playground bumps collab, crdt and toolkit together. Holding here on the working v0.33/v0.35 pair until then — live collaboration on main is unaffected.

@tannevaled

Copy link
Copy Markdown
Contributor Author

Correction — this was a CI flake, not a real regression. Ready to merge.

I re-ran the browser proofs locally (system Chrome + puppeteer-core) against exactly this pair: TestCollabLocalTabConvergence passes 4/4 and TestCollabLocalTabSequentialConvergence passes all three gaps (300/900/1200ms) — B converges on A's edit, remote carets paint, buffers merge, both directions. A native two-client-over-Pipe reproduction on collab v0.37 + crdt v0.39 also converges.

Re-running the failed CI job then went fully green (build, bricolint, test, browser-proofs). The first run hit a transient flake in the headless two-tab proofs (both collab tests at once). The earlier note about toolkit.CollabText needing a collab-v0.37 update was mistaken: MVS does run toolkit v0.294.0's CollabText against v0.37, and it converges correctly — no toolkit change is required.

Undrafting and merging.

@tannevaled
tannevaled marked this pull request as ready for review September 1, 2026 11:09
@tannevaled
tannevaled merged commit 2a0dfd2 into main Sep 1, 2026
7 of 8 checks passed
@tannevaled
tannevaled deleted the collab-crdt-snapshot-v8 branch September 1, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant