Skip to content

Migrate persistence to embedded Turso vectors#179

Open
EyJunge1 wants to merge 5 commits into
tickernelz:mainfrom
EyJunge1:feature/turso-only
Open

Migrate persistence to embedded Turso vectors#179
EyJunge1 wants to merge 5 commits into
tickernelz:mainfrom
EyJunge1:feature/turso-only

Conversation

@EyJunge1

Copy link
Copy Markdown

Summary

  • replace the SQLite/USearch backend stack with embedded Turso/libSQL and native vector indexes
  • migrate existing memory shards safely with backups, locking, verification, resume support, and dimension-aware re-embedding
  • harden lifecycle, shard scoping, web API authentication, CI platform checks, and upgrade coverage

Test plan

  • bun run typecheck
  • bun test (222 tests)
  • bun run build
  • bun run format:check
  • verify the packaged libSQL vector extension in the platform smoke workflow

Made with Cursor

@tickernelz

Copy link
Copy Markdown
Owner

I tried to merge this PR after integrating the newer PRs in this batch, but it now has merge conflicts in:

  • src/config.ts
  • src/index.ts
  • src/services/web-server.ts

Please rebase or merge the latest main and resolve the conflicts. This is a large persistence migration, so please also rerun the full build and test suite after resolving them; we can merge it afterward.

@EyJunge1

EyJunge1 commented Jul 22, 2026

Copy link
Copy Markdown
Author

Release note

This is planned as a major 3.0.0 release because it replaces the persistence format and vector backend. Existing data is migrated with backups and verification, but downgrading to v2 is not supported after migration.

All automated validation is green:

  • bun run typecheck
  • bun test (249 passing)
  • bun run build
  • bun run format:check

Please independently test the migration from existing SQLite/USearch data to embedded Turso/libSQL, including backup creation, verification, recovery, and real-world data.

@tickernelz

Copy link
Copy Markdown
Owner

Thanks for rebasing this. I retried it against the latest main after merging the newer PRs in this batch, but it still has merge conflicts in:

  • src/services/api-handlers.ts
  • src/services/migration-service.ts
  • src/services/web-server-worker.ts (modify/delete conflict)
  • src/services/web-server.ts
  • src/web/app.js

Please rebase or merge the latest main again and resolve these conflicts. Because this PR replaces the persistence layer, please rerun the frozen install, typecheck, build, and full test suite after resolving them; we can merge it afterward.

EyJunge1 and others added 3 commits July 23, 2026 08:51
Replace the SQLite and USearch stack with native libSQL vector storage, including safe legacy migration, lifecycle hardening, API authentication, and upgrade coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align direct dependencies with current releases while retaining the latest supported TypeScript 6 compiler and its stricter type checks.

Co-authored-by: Cursor <cursoragent@cursor.com>
Adopt the current compiler release after a clean typecheck, build, and full test run.

Co-authored-by: Cursor <cursoragent@cursor.com>
@EyJunge1
EyJunge1 force-pushed the feature/turso-only branch from 31f9c13 to 3445801 Compare July 23, 2026 06:52
@EyJunge1

EyJunge1 commented Jul 23, 2026

Copy link
Copy Markdown
Author

The branch has been rebased onto the latest main, all conflicts have been resolved, and the full validation suite passes: frozen install, typecheck, build, and all 250 tests.

EyJunge1 added 2 commits July 25, 2026 20:36
Updated the fetchAPI function to destructure and include extra headers from the options parameter, enhancing the flexibility of API requests.
…back hostname

Implemented a check for authentication status using the /api/health endpoint and conditionally display a warning banner based on the response. Added utility to identify loopback hostnames to suppress the warning in local development environments.
@EyJunge1

Copy link
Copy Markdown
Author

Hi, I’ve also tested the SQLite/USearch → embedded Turso migration locally on my machine (backup, migrate, verification, and basic recall afterwards). Branch is rebased, conflicts resolved, and the full suite is green. Happy to address anything else if you want another look before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants