12 Commits

Author SHA1 Message Date
Youzini-afk
d702e267d3 fix(migration): 7 critical fixes for Authority migration safety and data integrity
- Fix #2: _executeStatements fallback now batches transactions (150/batch)
  and reorders upsert-before-delete to prevent data loss on payload overflow
- Fix #3: Read/write migratedToAuthority marker in chat_metadata to prevent
  re-overwriting from legacy sources after Authority migration
- Fix #1: Add OPFS → Authority migration channel (exportOpfsSnapshotForChat,
  maybeImportLegacyOpfsSnapshotToLocalStore) inserted before IndexedDB in
  migration chain
- Fix #4: Mark runtimeVectorIndexState dirty with triviumRebuildRequired
  and trigger submitAuthorityVectorRebuildJob after all three migration paths
- Fix #5: Dual-save safety snapshots to Authority blob; rollback can now
  recover from blob when local IndexedDB snapshot is unavailable
- Fix #6: Add isEmptyCheck detail and console.warn for near-empty stores
  to help diagnose residual vs real data in store-not-empty skips
- Fix #7: Add overflow warning logs and sessionStorage persistence for
  Authority offline queue max-items/max-bytes exceeded events
2026-04-29 01:15:37 +08:00
Youzini-afk
d7cbbb20c1 Integrate Authority Blob storage 2026-04-28 12:53:18 +08:00
Youzini-afk
3f70d63a86 feat(authority): migrate local graphs to server primary 2026-04-28 03:02:43 +08:00
Youzini-afk
cfc122244a perf: optimize persist/load P1 hot paths 2026-04-22 18:34:56 +08:00
Youzini-afk
c12956f674 feat: promote opfs v2 as default local store 2026-04-14 19:34:44 +08:00
Youzini-afk
913a102b39 fix: backend vector state marked dirty on sync/restore import and query failure
- sync/bme-sync.js: conservatively clear backend hash mappings and mark
  vectorIndexState dirty before importing remote snapshots via download,
  merge, and cloud backup restore, preventing stale clean-looking state
  after cross-device sync or restore
- vector/vector-index.js: mark backend vector state dirty on real backend
  query failures (HTTP/network) instead of silently returning empty results
- regression: indexeddb-sync.mjs covers download/restore/merge import
  dirty marking; p0-regressions.mjs covers backend query failure dirtying
2026-04-12 19:42:45 +08:00
Hao19911125
4b9668fdc5 Clear restored backup dirty history markers 2026-04-12 15:09:11 +08:00
Hao19911125
288c33f3c3 Rebind restored backup history hashes locally 2026-04-12 11:49:34 +08:00
Hao19911125
580a049442 Slim manual cloud backups and guard truncated journal rollback 2026-04-12 10:43:38 +08:00
Youzini-afk
53672fa751 Fix manual backup manifest filename handling 2026-04-10 19:49:10 +08:00
Hao19911125
09b6e1e566 Add manual cloud backup controls and manager modal 2026-04-10 17:26:57 +08:00
Youzini-afk
feec17f3e3 Reorganize modules into layered directories 2026-04-08 01:17:57 +08:00