fix(sqlite): preserve persistence type contracts - #1866
KyleAMathews wants to merge 3 commits into
Conversation
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe change updates persisted collection schema inference and aligns the Expo SQLite driver with native Expo types. It preserves transaction callback results, validates bind values, and adds type-level and runtime tests. ChangesSQLite persistence contracts
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
More templates
@tanstack/angular-db
@tanstack/browser-db-sqlite-persistence
@tanstack/capacitor-db-sqlite-persistence
@tanstack/cloudflare-durable-objects-db-sqlite-persistence
@tanstack/db
@tanstack/db-ivm
@tanstack/db-sqlite-persistence-core
@tanstack/electric-db-collection
@tanstack/electron-db-sqlite-persistence
@tanstack/expo-db-sqlite-persistence
@tanstack/node-db-sqlite-persistence
@tanstack/offline-transactions
@tanstack/powersync-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/react-native-db-sqlite-persistence
@tanstack/react-router-with-db
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/tauri-db-sqlite-persistence
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
|
Size Change: 0 B Total Size: 165 kB ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 7.34 kB ℹ️ View Unchanged
|
Summary
persistedCollectionOptionsis passed tocreateCollectionexpo-sqliteoverloadsvoidHistorical context
The schema-composition gap dates to the original helper API; the stale #1453 explored the same overload direction. The Expo database boundary was handwritten rather than derived from Expo's real overloads, and the test double returned callback values even though the vendor API returns
void, masking the transaction-result bug.This PR intentionally does not adopt the coordinator-wire or atomic-resume extensions proposed in #1845 and #1846; those remain separate design work.
Verification
The schema oracle fails on the previous
mainbecause the row degrades toobject/Record<string, unknown>. A hostile Expo implementation that trusts the vendor transaction return fails by returningundefined; the repaired driver captures the callback result outside the vendor boundary.Summary by CodeRabbit