worktree-snapshots
Snapshots: a document no longer stops accepting edits at 4096 updates.
The Rust core encodes a whole document as one Yjs update and verifies a candidate; the store writes one every 256 updates, taken from the replayed state before the incoming update is applied; replay and the update endpoint both read snapshot-then-tail; the browser gets a raw=1 escape hatch for a snapshot that will not decode.
Replay of 4000 rows: 3.55ms with a snapshot, 71.10ms without. Also removes the constraint that forces the 2s save debounce, which is the next change.
Commits
18
Files changed
21
+3933 −113
Discussions
1
0 open
Tasks
1/4
done
Discussions 0 open
- No discussions on this branch yet.
Tasks 1/4 done
- Test verify_snapshot's delete-set arm — no fixture contains a deletion, so the state-vector arm always discriminates first Not started
- Shorten DEBOUNCE_MS now that snapshots make it affordable — the change a person actually feels Done
- replay still materialises the whole log slice before applying — bounded handle memory, unbounded slice; belongs with the compaction horizon Not started
- Comment pass: four stale comments in abi.rs, store.go, core.go and tests/snapshot.rs Not started
Activity
- task updated: Shorten DEBOUNCE_MS now that snapshots make it affordable — the change a person actually feels
- claude agent, operated by paul@keymail.dev replied to worktree-snapshots: a document no longer stops accepting edits at 4096 updates
- claude agent, operated by paul@keymail.dev replied to worktree-snapshots: a document no longer stops accepting edits at 4096 updates
- claude agent, operated by paul@keymail.dev added task replay still materialises the whole log slice before applying — bounded handle memory, unbounded slice; belongs with the compaction horizon
- claude agent, operated by paul@keymail.dev added task Comment pass: four stale comments in abi.rs, store.go, core.go and tests/snapshot.rs
- claude agent, operated by paul@keymail.dev added task Test verify_snapshot's delete-set arm — no fixture contains a deletion, so the state-vector arm always discriminates first
- claude agent, operated by paul@keymail.dev added task Shorten DEBOUNCE_MS now that snapshots make it affordable — the change a person actually feels
- claude agent, operated by paul@keymail.dev opened worktree-snapshots: a document no longer stops accepting edits at 4096 updates
- paul@keymail.dev pushed 6162408 Pre-merge fix wave: close the snapshot tail's fifth blind spot, spec the re-seed
- paul@keymail.dev pushed bdb7f7c Task 5b fix round: pin the refused row, and warn when a replay re-seeds
- paul@keymail.dev pushed b4d2ed3 Task 5b: a long log no longer bricks a document without a snapshot
- paul@keymail.dev pushed 8f4ed42 Pin the raw=1 spelling with a testable URL builder (review fix)
- paul@keymail.dev pushed 850ffe2 Give the browser a way out of a corrupt snapshot (Task 7)
- paul@keymail.dev pushed 5d53af6 Serve snapshot-then-tail from GET /d/{sqid}/updates, plus ?raw=1
- paul@keymail.dev pushed fb483b6 Plan 5 fix round: give the equivalence test teeth, and pin supersession
- paul@keymail.dev pushed 1cdd18a Plan 5: replay from a snapshot, and write one every 256 updates
- paul@keymail.dev pushed 718bc2c Fix round: add a test that decouples seq from id in newestSnapshot
- paul@keymail.dev pushed 10c6c47 Add doc_snapshots table and the newest-usable-snapshot reader
- paul@keymail.dev pushed d5e6f13 Task 3 fix round 2: name internal/docs, not this package, as the missing caller
- paul@keymail.dev pushed 60c4412 Task 3 fix round 1: test the verifier's actual mismatch case, fix a stale comment
- paul@keymail.dev pushed 9e61570 Task 3: the Go host can take and check a snapshot
- paul@keymail.dev pushed 3101692 Task 2 fix round 1: correct three untrue comments from review
- paul@keymail.dev pushed 1c44b30 Plan 4/Task 2: verify a candidate snapshot against its source document
- paul@keymail.dev pushed 442fb91 Core encodes a whole document as one update (ABI v4)
- paul@keymail.dev pushed 62dbede Plan 6: snapshots
- paul@keymail.dev pushed 8712b44 Spec: snapshots, so a document stops going read-only