Commit Graph

5 Commits

Author SHA1 Message Date
youzini
db5a341617 fix(authority): split graph SQL persistence by payload size 2026-05-06 15:37:19 +00:00
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
edaaca4bbd fix: convert named SQL params to positional for Authority server compatibility
Authority server expects params: SqlValue[] (positional array) but
ST-BME was sending params as a named map with :placeholders, causing
'invalid type: map, expected a sequence' deserialization errors.

Added convertNamedParamsToPositional() in AuthoritySqlHttpClient that
transforms :name placeholders to ? and extracts values in order before
sending to the server. This fixes the SQL probe failure that kept the
graph stuck in LOADING state.
2026-04-28 23:56:02 +08:00
Youzini-afk
a7e2edac88 refactor(authority): complete v0.6-only sql/blob/jobs rollout 2026-04-28 21:45:59 +08:00
Youzini-afk
dc37d22dcf feat(authority): add graph SQL store 2026-04-28 02:20:15 +08:00