experiments in a post-browser web
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(schema): add schema codegen system with build integration

- Add canonical schema definition (schema/v1.json)
- Add codegen script generating SQLite, TypeScript, Rust
- Add 26 fidelity tests verifying backend consistency
- Add CI freshness check (schema:check)
- Integrate into build (yarn build runs codegen)
- Add runtime validation to Server and Electron backends
- Document mobile schema drift as priority TODO

+23
+23
schema/README.md
··· 2 2 3 3 Single source of truth for sync schema definitions across all backends. 4 4 5 + ## PRIORITY TODO: Mobile Schema Migration 6 + 7 + **Tauri Mobile has known schema drift that needs migration:** 8 + 9 + | Issue | Canonical | Mobile (Current) | 10 + |-------|-----------|------------------| 11 + | Column naming | camelCase | snake_case (`sync_id`, `created_at`) | 12 + | Timestamp type | INTEGER (Unix ms) | TEXT (ISO strings) | 13 + | tags.id | TEXT (UUID) | INTEGER AUTOINCREMENT | 14 + | item_tags.tagId | TEXT | INTEGER | 15 + 16 + **Why it's deferred:** The migration requires synchronized changes to both Rust (~4000 lines) and Swift Share Extension (~2000 lines). Sync still works because the wire format (JSON) is independent of local schema. 17 + 18 + **Migration plan:** 19 + 1. Update Rust fresh install schema to canonical 20 + 2. Add v1→v2 migration for existing databases 21 + 3. Update all Rust SQL queries (~100+ places) 22 + 4. Update Swift record structs and initializations 23 + 5. Update Swift SQL queries 24 + 6. Test migration with real iOS databases 25 + 26 + See `notes/sync-architecture-review.md` for full analysis. 27 + 5 28 ## Quick Start 6 29 7 30 ```bash