Skip to content

fix: make offline read replicas durable across restart and compaction - #9

Open
ettoc00 wants to merge 14 commits into
trestleinc:mainfrom
ettoc00:fix/durable-offline-replicas
Open

ettoc00 wants to merge 14 commits into
trestleinc:mainfrom
ettoc00:fix/durable-offline-replicas

Conversation

@ettoc00

@ettoc00 ettoc00 commented Sep 17, 2026 •

Copy link
Copy Markdown

Closes #8.

Persisted collections could stay unready behind an unresolved recovery query, deleted records could return after reopening storage, and cursors/presence could overtake document persistence. Fresh clients could miss fully compacted records. A rejected writable delete also left its local tombstone in place; simply merging an older Yjs snapshot could not undo it.

This change separates local readiness from transport, makes local data durable before acknowledging progress, and discovers snapshots alongside deltas. Automatic writable behavior remains the default.

Behavior

  • Collections support networkMode: 'manual', readOnly, captured application requestArgs, and awaitable connect(), disconnect(), and reset(). Protocol fields are reserved, and stale transport completions cannot mutate a later generation.
  • Persistence providers drain writes and durably remove documents. SQLite clears snapshots/deltas atomically. Raw Yjs updates survive restart even when dependencies have not arrived. Document writes precede durable cursors, which precede presence acknowledgements. Local mutation completion also waits for its document writes.
  • Recovery honors authoritative absence. Writable pending creations have durable markers and retry without repeating onInsert; legacy unmarked writable creations remain protected when the server has no history of their ID. Full-row updates remove omitted optional fields.
  • Rejected deletes use a newer marker-removal transaction, preserving concurrent fields and persisting rollback before republishing. Previously accepted batch members stay deleted. Internal per-document repair metadata survives restart so the next explicit update/delete sends the complete causal Yjs history. Delayed acknowledgements cannot erase a newer repair. Content-sync repair derives both full bytes and materialized fields from the same current document, preserving streamed changes. This adds no automatic retry or general transaction outbox; a crash before rollback completes retains the existing ambiguous in-flight-write limit.
  • Compaction publishes snapshots at fresh collection sequences. Bounded snapshot/delta pages advance only through emitted entries; retention still uses client state vectors.
  • Browser persistence accepts a local assetBase. A checked asset-copy CLI provides the compatible JS/WASM graph and notices for self-hosting and precaching. The R2 example restricts a dedicated public-assets bucket to the declared immutable prefix.

Runtime distribution

The exact original-author rhashimoto/wa-sqlite archive at 07ad48cf2f682d279f9cd69818cc1d39b2ccda86 replaces copied runtime source/binaries. The unofficial unscoped npm package has a different VFS API and is not substituted. Installation uses HTTPS without Git/SSH or compiler tooling; there are no additional runtime dependencies or install/build hooks in that archive.

The CLI checks fixed per-file SHA-256 hashes and retains LICENSE, ACKNOWLEDGMENTS.md, and provenance. The WASM reports SQLite 3.53.0. Manifest digests and loader/WASM revisions identify the distributed artifacts; this is not an independent reproduction of their compiler environment. npm records archive integrity; Bun 1.3.6 pins the full commit URL without a separate integrity digest.

Installation adds about 15.4 MB of upstream repository files. The eight browser runtime files served total 1,492,236 bytes, about 2.7% above the earlier graph. GitHub access is needed for installation, not offline startup with locally precached assets. The historical CDN remains the default when assetBase is omitted. No browser or copied wa-sqlite implementation is added to production code.

Compatibility and migration

This targets upstream main at f21c275126a51ab425c0223e1bec8a918d76a462 and its v2 preview schema. Published 1.1.2 has a different component schema and is not a supported direct migration.

Existing v2 collections must run bounded, idempotent migrateSnapshots through an internal administrative wrapper until done. Each batch atomically republishes legacy snapshots above retained sequence evidence; interruption is resumable. Streaming pauses while legacy snapshots remain, so plan a synchronization maintenance window. Writes, scheduled compaction, local reads, and per-document recovery can continue.

Old v2 clients understand the snapshot/numeric-cursor wire format after migration, although their local durability bugs remain. Legacy component code/compaction and schema rollback are unsupported. Cursors already corrupt above all retained evidence need cache recovery/reset; preserve unsent writable data first.

Direct third-party providers need the documented durable capabilities. Legacy encrypted IDs must be discoverable through the underlying adapter. Encryption protects payloads, while storage metadata, key names, and document-ID indexes remain visible. No application authorization policy is introduced.

See docs/offline-replicas.md, docs/CDN.md, and the Unreleased changelog for setup and boundaries.

Verification

Current code was tested in an isolated public checkout on Windows with Node 24.20.0, Bun 1.3.6, and locked Convex 1.31.6:

  • bun run test: 126 tests passed in 11 files. Windows sandbox loader restrictions required a source-equivalent ESM runner configuration; test setup, globs and assertions were unchanged, and the explicit Node environment restated the existing file directive. Actual collections and SQLite cover unresolved transport, raw disk close/reopen, deletion/recovery, failed/delayed persistence, cursor ordering/replay, reset/account fencing, read-only/writable behavior, request context and raw missing-dependency updates. Twelve new delete/repair regressions cover rollback persistence, abrupt restart then server-Y.Doc convergence, partial batch acceptance, concurrent fields, authoritative removal, older/newer repair acknowledgement races, and full-bytes/material consistency after an interleaved stream. They include a negative check that completes recovery after restart and verifies zero repair mutations until an explicit update.
  • Component coverage includes fully compacted/mixed discovery, page limits 1/2, scheduled compaction, existing/interrupted migration, and 24 seeded write/compaction/page histories.
  • Package build/declarations/publint, tsc --noEmit, required repository lint:fix, and package lint passed. Source/assets and exports were unchanged by the following documentation-only commits.
  • bun run test:browser: 10 real Chromium offline/process-restart checks passed with actual SQLite/WASM assets.
  • node scripts/test-native-bundle.cjs: the full built Android client graph passed Expo Metro bundling, excluding the browser SQLite loader/VFS. This is not native-device execution.
  • The extracted R2 Worker example passed a synthetic bucket harness: nine expected reads and six rejected requests before any bucket read. No Worker deployment or live bucket access occurred.
  • Three independent final reviews passed frozen commit 5be07ea15a6dc537b29c1fe5454c358464763a2c: cleanliness/maintainability, durability, and compaction/upgrade correctness. The fix-and-repeat cycle found and corrected both the rejected-delete causal-history gap and the content-sync material/bytes race. Reviewers independently inspected pinned source and raw evidence; Sol executed the requested fresh tests in separate worktrees. This was review-only, not an OS-enforced read-only sandbox.

Additional preserved evidence has narrower applicability:

  • Before the rejected-delete correction, an installed tarball consumer passed JS/type export checks, strict NodeNext declaration resolution, repeated asset copying from a path with spaces, and preservation of unrelated files. A missing export failed with TS2307; corrupted WASM was rejected before creating the destination; Node/SSR preload rejected without fetching. Packaging/assets/exports are unchanged by this client-only correction.
  • Earlier independent legacy-runtime → candidate → legacy-runtime browser compatibility passed 12 scenario groups, preserving rows and cursor 2 with zero offline HTTP requests. That compatibility run was not repeated for the client-only correction.
  • Two additional actual-component temporal experiments passed migration, pre-ack retention, recovery, cursor and fresh-reader convergence assertions, including full-state repair history and writes/compaction between pages. Their final cleanup assertions failed: the unchanged upstream Yjs V2 empty-diff length predicate conservatively retains acknowledged deltas. This pre-existing storage/performance defect remains outside this PR and is not counted as a passing test.
  • Earlier application/component verification used an official local Windows Convex backend with a hash-verified release and synthetic data: 12 backend checks and five additional browser checks passed, including backend restart during migration. These precede the runtime distribution update and are not claimed as reruns on this candidate. Legacy-data tests seeded the v2 layout rather than deploying an older component binary.

Selected regression tests failed as expected on untouched upstream for readiness, durable deletion, and compacted discovery. Browser execution covered Chromium on Windows; no actual Linux/macOS or native-device execution is claimed. No cloud deployment or package publication was performed.

Diff size

At 5be07ea, approximately 2.8k added lines (60% of additions) are tests and verification tooling.

Category Added Removed Net change
Production 1,343 706 +637
Tests 2,773 2 +2,771
Docs 520 369 +151
Total 4,636 1,077 +3,559

Counts are relative to the PR base. Tests include browser/native fixtures and verification scripts; Docs includes configuration, build metadata, and asset provenance.

@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 0f37bade-5167-4322-be97-e4fbcaeaade3

📥 Commits

Reviewing files that changed from the base of the PR and between 82ca43d and 5be07ea.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • docs/CDN.md
  • docs/offline-replicas.md
  • packages/replicate/src/client/collection.ts
  • packages/replicate/src/test/offline.test.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Walkthrough

This change adds durable offline replica behavior across persistence, connection lifecycle, recovery, and component discovery. It adds manual and read-only modes, request-argument capture, awaitable lifecycle methods, serialized writes, durable raw-update storage, and SQLite shutdown transactions. Component snapshots now support publication markers, migration batches, and ordered snapshot/delta streaming. The package now includes pinned, checksummed wa-sqlite assets with browser, native, packed-consumer, and CI validation. Documentation covers the new APIs and migration process.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 5be07

The previously identified documentation and command-availability concerns are resolved, with no remaining merge-blocking risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.85% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 52 functions across 43 files. (3 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: durable offline read replicas across restarts and compaction.
Description check ✅ Passed The description is directly related to the changeset. It explains durability fixes, lifecycle behavior, migration requirements, runtime assets, testing, and compatibility limits.
Linked Issues check ✅ Passed The description explicitly closes issue #8 and addresses its stated problems: unresolved recovery readiness, deleted records returning after reopen, and missed compacted records.
Out of Scope Changes check ✅ Passed The changes to client persistence, component migration, SQLite assets, documentation, and verification tooling support the stated durability and offline-replica objectives. No unrelated feature area i…
Full details: Docstring Coverage

Explanation

Docstring coverage is 28.85% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 52 functions across 43 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Update the remaining OPFS references and document assetBase. · README.md:367-379

README.md:367-379
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update the remaining OPFS references and document assetBase.

Line 3 now states that web storage uses IndexedDB-backed SQLite. These sections still describe OPFS. docs/offline-replicas.md line 82 states the browser worker uses IDBBatchAtomicVFS (IndexedDB), not OPFS. The same stale claim also appears at line 1069 ("SQLite in OPFS"). The WebSqliteOptions block also omits assetBase, which docs/offline-replicas.md line 93 and packages/replicate/test/browser/main.ts line 37 both use.

📝 Proposed documentation fix
-| `persistence.web.sqlite.create(options)`     | Browser      | wa-sqlite in a Web Worker with OPFS storage    |
+| `persistence.web.sqlite.create(options)`     | Browser      | wa-sqlite in a Web Worker with IndexedDB storage |
@@
 interface WebSqliteOptions {
-	name: string; // Database name in OPFS
+	name: string; // Database name in IndexedDB
+	assetBase?: string; // Base path of the copied wa-sqlite runtime assets
 	worker: Worker | (() => Worker | Promise<Worker>);
 }

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: b7a2cf5a-78d2-4c4e-ab1d-1e8ccc396ae1

📥 Commits

Reviewing files that changed from the base of the PR and between f21c275 and adb62ee.

⛔ Files ignored due to path filters (4)
  • bun.lock is excluded by !**/*.lock
  • packages/replicate/assets/wa-sqlite/dist/wa-sqlite-async.mjs is excluded by !**/dist/**
  • packages/replicate/assets/wa-sqlite/dist/wa-sqlite-async.wasm is excluded by !**/dist/**, !**/*.wasm
  • packages/replicate/src/component/_generated/component.ts is excluded by !**/_generated/**
📒 Files selected for processing (53)
  • .gitattributes
  • .github/workflows/ci.yml
  • .gitignore
  • .prettierignore
  • CHANGELOG.md
  • README.md
  • docs/offline-replicas.md
  • eslint.config.js
  • packages/replicate/assets/wa-sqlite/ACKNOWLEDGMENTS.md
  • packages/replicate/assets/wa-sqlite/LICENSE
  • packages/replicate/assets/wa-sqlite/manifest.json
  • packages/replicate/assets/wa-sqlite/src/FacadeVFS.js
  • packages/replicate/assets/wa-sqlite/src/VFS.js
  • packages/replicate/assets/wa-sqlite/src/WebLocksMixin.js
  • packages/replicate/assets/wa-sqlite/src/examples/IDBBatchAtomicVFS.js
  • packages/replicate/assets/wa-sqlite/src/sqlite-api.js
  • packages/replicate/assets/wa-sqlite/src/sqlite-constants.js
  • packages/replicate/package.json
  • packages/replicate/scripts/copy-sqlite-assets.mjs
  • packages/replicate/scripts/test-native-bundle.cjs
  • packages/replicate/scripts/test-offline-browser.mjs
  • packages/replicate/scripts/verify-sqlite-provenance.mjs
  • packages/replicate/src/client/bindings/counter.ts
  • packages/replicate/src/client/bindings/set.ts
  • packages/replicate/src/client/collection.ts
  • packages/replicate/src/client/documents.ts
  • packages/replicate/src/client/persistence/custom.ts
  • packages/replicate/src/client/persistence/encrypted/web.ts
  • packages/replicate/src/client/persistence/memory.ts
  • packages/replicate/src/client/persistence/sqlite/preload.ts
  • packages/replicate/src/client/persistence/sqlite/schema.ts
  • packages/replicate/src/client/persistence/sqlite/web.ts
  • packages/replicate/src/client/persistence/sqlite/worker.ts
  • packages/replicate/src/client/persistence/types.ts
  • packages/replicate/src/client/persistence/writes.ts
  • packages/replicate/src/client/prose.ts
  • packages/replicate/src/client/services/connection.ts
  • packages/replicate/src/client/services/presence.ts
  • packages/replicate/src/component/mutations.ts
  • packages/replicate/src/component/schema.ts
  • packages/replicate/src/server/index.ts
  • packages/replicate/src/shared/index.ts
  • packages/replicate/src/test/assets.test.ts
  • packages/replicate/src/test/component.test.ts
  • packages/replicate/src/test/discovery.test.ts
  • packages/replicate/src/test/offline.test.ts
  • packages/replicate/src/test/persistence-writes.test.ts
  • packages/replicate/src/test/recovery.test.ts
  • packages/replicate/src/test/server-functions.ts
  • packages/replicate/test/browser/index.html
  • packages/replicate/test/browser/main.ts
  • packages/replicate/test/native/index.js
  • packages/replicate/test/native/package.json

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.

Comment thread .github/workflows/ci.yml Outdated
Comment thread packages/replicate/src/client/collection.ts
Comment thread packages/replicate/src/client/persistence/encrypted/web.ts
Comment thread packages/replicate/src/client/persistence/sqlite/schema.ts Outdated
Comment thread packages/replicate/src/client/persistence/sqlite/worker.ts Outdated
@ettoc00

ettoc00 commented Sep 17, 2026

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 87ed1d80-cb7c-4719-98f0-968a7dcc1265

📥 Commits

Reviewing files that changed from the base of the PR and between c3d6e49 and ab574aa.

📒 Files selected for processing (18)
  • .github/workflows/ci.yml
  • AGENTS.md
  • CHANGELOG.md
  • CLAUDE.md
  • README.md
  • docs/CDN.md
  • docs/tests.md
  • packages/replicate/scripts/test-offline-browser.mjs
  • packages/replicate/src/client/collection.ts
  • packages/replicate/src/client/persistence/custom.ts
  • packages/replicate/src/client/persistence/encrypted/web.ts
  • packages/replicate/src/client/persistence/memory.ts
  • packages/replicate/src/client/persistence/sqlite/native.ts
  • packages/replicate/src/client/persistence/sqlite/schema.ts
  • packages/replicate/src/client/persistence/sqlite/web.ts
  • packages/replicate/src/client/persistence/sqlite/worker.ts
  • packages/replicate/src/test/offline.test.ts
  • packages/replicate/test/browser/main.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.

Comment thread docs/tests.md Outdated
@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ettoc00

ettoc00 commented Sep 17, 2026

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: fcef9ed7-5982-4a9c-9cd5-8157d054cea2

📥 Commits

Reviewing files that changed from the base of the PR and between 267ef9f and aa2307e.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (16)
  • apps/sveltekit/package.json
  • docs/CDN.md
  • docs/offline-replicas.md
  • package.json
  • packages/replicate/assets/wa-sqlite/PROVENANCE.md
  • packages/replicate/assets/wa-sqlite/manifest.json
  • packages/replicate/package.json
  • packages/replicate/scripts/copy-sqlite-assets.mjs
  • packages/replicate/scripts/test-native-bundle.cjs
  • packages/replicate/scripts/test-offline-browser.mjs
  • packages/replicate/scripts/test-packed-consumer.mjs
  • packages/replicate/scripts/verify-sqlite-provenance.mjs
  • packages/replicate/src/test/assets.test.ts
  • packages/replicate/test/browser/baseline-wa-sqlite-manifest.json
  • packages/replicate/test/browser/main.ts
  • packages/replicate/tsdown.config.ts
💤 Files with no reviewable changes (2)
  • package.json
  • apps/sveltekit/package.json

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.

Comment thread docs/CDN.md Outdated
Comment thread docs/offline-replicas.md Outdated
Comment thread packages/replicate/scripts/test-packed-consumer.mjs Outdated
@ettoc00

ettoc00 commented Sep 19, 2026

Copy link
Copy Markdown
Author

@coderabbitai review

Addressed the three findings: the documentation now distinguishes the worker asset base from the complete service-worker precache graph and gives the hosted manifest path; the packed-consumer harness canonicalizes temporary paths while preserving cleanup.

Three independent follow-up reviews also found and verified a local mutation acknowledgement race and the removed Node/SSR preload guard. These are fixed in 82ca43d, with regression tests; all three reviewers passed the new candidate. The PR description records the exact checks and a separately discovered, pre-existing compaction cleanup limitation.

@coderabbitai

coderabbitai Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

@ettoc00 I will review the updates in 82ca43d.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (2)

🟠 Major · Restrict the R2 Worker to published assets. · CDN.md:119-120

docs/CDN.md:119-120
🔒 Security & Privacy | 🛡️ Analyzed with Security Review | 🟠 Major | ⚡ Quick win

Sensitive Data Exposure

Reachability: External
Exploitability: Moderate
CWE: CWE-200 — Exposure of Sensitive Information to an Unauthorized Actor

Restrict the R2 Worker to published assets.

The setup creates a versioned prefix, but the Worker does not enforce it. The request pathname becomes the complete R2 key, so a mixed-use RUNTIME_BUCKET can expose any addressed non-public object. Require a dedicated public-assets bucket, or enforce and document an immutable published prefix.

🟡 Minor · Invoke the asset CLI through the package manager. · offline-replicas.md:93

docs/offline-replicas.md:93
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Invoke the asset CLI through the package manager.

This command is shown as a direct shell command, but the package exposes it only as a local binary. Use npm exec -- replicate-sqlite-assets public/replicate-sqlite, bunx, or a package script so the binary is available on PATH.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: b7876297-c140-4caa-a5f7-d7030faf6ee1

📥 Commits

Reviewing files that changed from the base of the PR and between aa2307e and 82ca43d.

📒 Files selected for processing (7)
  • docs/CDN.md
  • docs/offline-replicas.md
  • packages/replicate/scripts/test-packed-consumer.mjs
  • packages/replicate/src/client/collection.ts
  • packages/replicate/src/client/persistence/sqlite/preload.ts
  • packages/replicate/src/test/assets.test.ts
  • packages/replicate/src/test/offline.test.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.

Comment thread packages/replicate/src/client/collection.ts Outdated
@ettoc00

ettoc00 commented Sep 19, 2026

Copy link
Copy Markdown
Author

@coderabbitai review

Updated to 5be07ea15a6dc537b29c1fe5454c358464763a2c. Rejected deletes now durably remove their own tombstone markers, preserve concurrent fields and accepted batch members, and retain restart-safe causal repair metadata until an explicit write succeeds. Fresh testing also found and fixed a content-sync repair race: full Yjs bytes and materialized fields now come from the same current document. The public-assets Worker example restricts the versioned prefix in a dedicated public bucket, and the asset command uses npm exec.

All three independent reviews passed after the fix-and-repeat cycle. Current package suite: 126 tests; 10 real Chromium offline/process-restart checks; build/types/lint/publint and full Android Metro bundle passed. The PR body distinguishes prior evidence and the known upstream delta-cleanup limitation. Please review the new changes.

@coderabbitai

coderabbitai Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

@ettoc00 I will review the changes in 5be07ea15a6dc537b29c1fe5454c358464763a2c.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.

Durable offline replicas and compacted-record discovery: proposed contribution

2 participants