fix(sqlite-persistence): accept Tauri string migration errors - #1900
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 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)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe duplicate-column migration guard now recognizes matching string failures as well as ChangesTauri SQLite migration handling
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The migration test covers startup with an existing column, and unrelated database errors remain visible. No merge-blocking issue was identified. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The migration now accepts a narrowly matched string error so an existing database can start without discarding legacy data. No new data-access path was identified. The regression test uses a simulated database boundary, so native-host behavior and recovery from an interrupted migration remain unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (1 skipped: 1 unsupported.)
✨ 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: 172 kB ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 7.34 kB ℹ️ View Unchanged
|
🎯 Changes
Tauri's SQL plugin can reject an
ALTER TABLEcall with a string. The migration check accepted onlyErrorobjects. A duplicate-column result could therefore stop persisted Collection startup instead of completing the migration (#1711).The migration check now accepts messages from strings and
Errorobjects. It ignores a duplicate-column result only when the message names that migration column. Other failures, such asdatabase is locked, still reject startup.The Tauri integration test seeds a legacy
applied_txtable and converts database errors to strings. It runs the migration through the Tauri driver and checks the new column, legacy data, a committed transaction, and data after reopening the database. The test uses Better SQLite to simulate the Tauri error boundary. It does not run in a native Tauri host.✅ Checklist
Verification:
pnpm --dir packages/db-sqlite-persistence-core exec vitest run --pool-options.threads.maxThreads=2— 176 checks passed, with no type errors.pnpm --dir packages/tauri-db-sqlite-persistence exec vitest run --pool-options.threads.maxThreads=2— 61 checks passed, with no type errors.🚀 Release Impact
Closes #1711
Summary by CodeRabbit