Repository navigation
Conversation
… doc On a page's first database start, the seed copies what the store already holds into the new database. It sent only JSON-AD, so the database rebuilt each document from its propvals under a fresh peer id: the same values, but a version vector the server reads as ahead of its own. The next full drive reconcile then asked the tab to push those documents back. For a read-only member that push is refused as a whole. In e2e.spec.ts:106 the invitee's tab holds the drive's ontology before its own database opens, and about one run in three the server named that ontology in `pull` (client 24 ops under one new peer, server the same 24 ops under the owner's two peers), which ended in "SYNC_PUSH rejected ... has no write right on the drive". A resource with a Loro document is now written with its snapshot (`putResourceWithSnapshot`), so the database keeps its real history. Resources without one still go in one batch, properties first as before.
This was referenced Sep 25, 2026
joepio
added a commit
that referenced
this pull request
Sep 25, 2026
Member
Author
|
Landed on develop in ef161c3 via the combined batch #1844 (green on Mancave, run 4645). Closing. Generated by Claude Code |
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.
Requested by Joep · project thread
Before: sometimes, when an invitee with read-only rights opened a shared drive, the browser logged
[WS] SYNC_PUSH rejected for drive … has no write right on the drive. This is the failuree2e.spec.ts:106"authorization, invite, share menu" hits on batch #1773.After: the invitee's tab keeps the real history of what it has read. The server no longer takes it for local changes, so it never asks the tab to push them.
On a page's first database start,
initClientDbcopies the resources the store already holds into the new database. It sent only JSON-AD, so the database rebuilt each Loro document from its propvals under a fresh peer id. The values were the same, but the version vector was not: the server read it as ahead of its own and put the subject inpull. In the invite spec, the invitee's tab holds the drive's ontology before its own database opens. With a temporary log inhandle_sync_vv_filtered, the server asked for that ontology in about 1 of 3 runs. The client had 24 ops under one new peer; the server had the same 24 ops under the owner's two peers.How:
snapshotForexports the snapshot of a resource that has a Loro document with ops in it. Those resources are written withputResourceWithSnapshot. Everything else still goes in oneputResourcesbatch, and properties are still seeded first. This bug is already on develop (the seed loop is older than the batch). It showed up once #1771 answered stale probes with a full version-vector SYNC. #1771's server-side pull gate (b5988e9) hides the symptom for non-writers; this fixes the cause, which also affects writers (a needless push of rebuilt history).Tests:
initClientDb.seed.test.ts: a store resource with Loro history is seeded with its snapshot, and the others are batched. It fails without the fix (noputResourceWithSnapshotcall) and passes with it.vitest run: 1300 tests pass. The only failing file isscripts/integration-mcp.test.mjs, which fails on the base too.tsc --noEmitis clean andpnpm run -r lintpasses.e2e.spec.ts -g "authorization, invite"on the batch head (e5e0f2d) with the temporary server log: without the fix the gate caught a push request in 1 to 2 of every 6 runs, and every one was the drive's ontology. The seed was writing that same subject without a snapshot in the same runs (2 of 2 matched). With the fix: 8 of 8 runs passed and nothing was caught.