Skip to content

Reconcile Karte persistence on Cloudflare D1 - #49

Merged
sarthakagrawal927 merged 1 commit into
mainfrom
codex/migrate-turso-to-d1
Aug 2, 2026
Merged

sarthakagrawal927 merged 1 commit into
mainfrom
codex/migrate-turso-to-d1

Conversation

@sarthakagrawal927

Copy link
Copy Markdown
Member

What changed

  • replaced the two remaining Turso-backed operator scripts with a shared, local-by-default Wrangler D1 boundary
  • made production D1 access explicit through --remote and kept isolated local state available through --persist-to
  • removed the now-unused @libsql/client production dependency and OpenNext externals
  • corrected current documentation and public stack descriptions that still described Turso as authoritative
  • added focused SQL binding, target-selection, and aggregate-rebuild tests

Why

Karte's production runtime and Better Auth data already use the linkchat-auth D1 binding, but two documented scripts, one dependency, and several current descriptions still assumed Turso. This reconciles the maintained repository with the live D1 architecture without changing production resources or data.

Validation

  • isolated local D1: all 11 migrations plus four demo profiles
  • local aggregate rebuild and profile-enrichment write
  • PRAGMA foreign_key_check: no violations
  • pnpm check
  • pnpm typecheck
  • pnpm test — 88 passing
  • pnpm docs:check — 0 errors, 8 pre-existing archive warnings
  • pnpm build
  • git diff --check

No remote D1 query/write, schema change, resource creation, binding mutation, deployment, secret change, or Turso mutation was performed.

The dependency audit still reports existing advisories and strict Knip still reports the unrelated normalizePath unused export; neither was widened into this migration.

Closes #48

@sarthakagrawal927
sarthakagrawal927 marked this pull request as ready for review August 2, 2026 12:08
@sarthakagrawal927
sarthakagrawal927 merged commit 4db3e6a into main Aug 2, 2026
3 checks passed
@sarthakagrawal927
sarthakagrawal927 deleted the codex/migrate-turso-to-d1 branch August 14, 2026 11:43
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.

Migrate Turso persistence to Cloudflare D1

1 participant