Commit a7d858e
feat: Cloudflare DO SQLite persisted collection (#1360)
* docs: add sqlite persistence plan and phased guard rails
* feat: add sqlite persisted collection core phase-0 package
* feat(db): harden index lifecycle contract for phase-2 bootstrap
* feat: add time-based applied_tx pruning policy
* feat: add node sqlite persisted collection package
* fix: add better-sqlite3 type definitions for node adapter
* feat: add electron sqlite ipc bridge package
* test: add portable runtime bridge e2e contract
* ci: apply automated fixes
* fix: stabilize electron runtime bridge e2e harness
* test: run electron runtime e2e via built fixtures
* fix: use cjs preload for electron runtime bridge e2e
* feat: add react-native/expo sqlite persisted collection package
* ci: apply automated fixes
* fix: align mobile adapter typing and burst persistence test
* ci: apply automated fixes
* feat: add cloudflare DO sqlite persistence with wrangler e2e
* test: harden cloudflare DO schema and transaction semantics
* docs: add complete API readmes for sqlite persistence packages
* refactor: unify sqlite persistence APIs around shared persisters
* refactor: simplify sqlite persistence APIs across runtimes
* fix: narrow generic adapter cast in cloudflare persistence
* fix(cloudflare-e2e): use collection-resolved adapter in worker fixture
* feat(sqlite): accept native runtime handles in persistence factories
* refactor(persistence): require native sqlite handles only
* chore: refresh pnpm lockfile for cloudflare package peers
* ci: apply automated fixes
* feat(browser): implement phase 7 single-tab persistence
* fix(browser): move phase 7 opfs path into worker
* docs: update phase 8 plan with implementation status annotations
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: apply automated fixes
* feat(browser): implement Phase 8 BrowserCollectionCoordinator for multi-tab support
Web Locks for per-collection leadership election, BroadcastChannel for
cross-tab RPC transport, DB writer lock for SQLite write serialization,
envelope dedup for exactly-once mutations, and leader heartbeats.
Includes 15 unit tests with Web Locks/BroadcastChannel mocks.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: apply automated fixes
* chore: extract electron, node, and cloudflare persistence packages to follow-up branches
Remove db-electron-sqlite-persisted-collection, db-node-sqlite-persisted-collection,
and db-cloudflare-do-sqlite-persisted-collection from this branch so it contains only
the core persistence packages (db, db-sqlite-persisted-collection-core,
db-browser-wa-sqlite-persisted-collection, db-react-native-sqlite-persisted-collection).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add node and cloudflare DO sqlite persisted collection packages
Restore db-node-sqlite-persisted-collection (better-sqlite3 driver) and
db-cloudflare-do-sqlite-persisted-collection (Durable Object driver) with
their test suites and e2e configurations.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: remove node sqlite package (moved to electron branch)
The node SQLite driver is needed by the electron package tests, so it has
been moved to the kevin/persistence-electron branch instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: regenerate pnpm-lock.yaml after rebase on main
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: remove duplicate CollectionIndexMetadata export from rebase
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: remove duplicate age-based pruning block causing deadlock in CF DO driver
The rebase duplicated the applied_tx age-based pruning DELETE. The second
copy used this.driver instead of the transaction driver parameter, which
deadlocked the cloudflare DO driver's serialized queue.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: remove duplicate type definition from rebase in electron e2e fixtures
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: use objectContaining in e2e contract to handle virtual props
The runtime bridge e2e test used exact equality which fails now that
collections include virtual props ($collectionId, $key, $origin, $synced).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: remove electron/node changeset that belongs to a different branch
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: restore electron and node packages removed by stale extraction commits
These packages were removed from this branch before they were merged to
main. Now that they're on main, the extraction commits incorrectly delete
them during rebase. Restore them from main.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ci: restore node and electron e2e test steps in workflow
These were removed by the extraction commits but the packages are back
on main now.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 6cce9ff commit a7d858e
File tree
32 files changed
+4761
-19
lines changed- .changeset
- .github/workflows
- packages
- db-cloudflare-do-sqlite-persisted-collection
- e2e
- fixtures
- src
- tests
- helpers
- db-sqlite-persisted-collection-core/tests/contracts
- persistance-plan
32 files changed
+4761
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
| |||
0 commit comments