Skip to content

[codex] Cut storage over to FumaDB#817

Merged
RhysSullivan merged 26 commits into
mainfrom
codex/fumadb-cutover
May 15, 2026
Merged

[codex] Cut storage over to FumaDB#817
RhysSullivan merged 26 commits into
mainfrom
codex/fumadb-cutover

Conversation

@RhysSullivan
Copy link
Copy Markdown
Owner

@RhysSullivan RhysSullivan commented May 14, 2026

Summary

  • Vendor FumaDB into the workspace and make Executor storage speak FumaDB tables directly.
  • Remove the core SDK Drizzle/PGlite entrypoints so SDK consumers pass a FumaDB database instead of inheriting a bundled database choice.
  • Keep the local app on SQLite via a FumaDB SQLite composition, with a one-shot import path for existing local SQLite data.
  • Move Postgres/PGlite setup into the cloud and worker test/dev owners that actually need it.
  • Move runtime Drizzle schema setup into the vendored FumaDB adapter layer.

Impact

This is a full storage cutover. The old custom storage model and SDK-owned database helpers are removed rather than kept as compatibility layers. Core stays database-agnostic at runtime, while apps/tests compose the FumaDB database they want.

Coverage Notes

  • Restores local legacy Drizzle migration coverage for OpenAPI, MCP, GraphQL, Google Discovery, OAuth connection normalization, and migration SQL nesting.
  • Adds local DB upgrade and SQLite-to-Fuma import coverage, including plugin-shaped legacy rows with JSON, boolean, bigint, date, nullable, scope, and id values.
  • Adds Fuma-native executor coverage for transaction rollback, unique violation propagation, close hooks, and source detection behavior.
  • Restores MCP RFC 9728 protected-resource metadata probe coverage.

Validation

  • bun run format:check
  • bun run lint
  • bun run scripts/check-changelog-stubs.ts
  • bun run --cwd apps/local typecheck
  • bun run --cwd packages/core/sdk typecheck
  • bun run --cwd packages/plugins/mcp typecheck
  • bun run --cwd apps/local test -- src/server/db-upgrade.test.ts src/server/sqlite-import.test.ts src/server/mcp-oauth.test.ts src/server/migrate-openapi-bindings.test.ts src/server/migrate-mcp-bindings.test.ts src/server/migrate-graphql-bindings.test.ts src/server/migrate-google-discovery-bindings.test.ts src/server/migrate-oauth-connections.test.ts src/server/migration-nesting.test.ts
  • bun run --cwd packages/core/sdk test -- src/executor.test.ts
  • bun run --cwd packages/plugins/mcp test -- src/sdk/probe-shape.test.ts
  • node ../../node_modules/vitest/vitest.mjs run src/mcp-flow.test.ts from apps/cloud

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 14, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing c1e16a7 Commit Preview URL

Branch Preview URL
May 15 2026, 02:39 AM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 14, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud c1e16a7 May 15 2026, 02:39 AM

Comment thread packages/plugins/openapi/src/sdk/store.ts Outdated
@RhysSullivan RhysSullivan force-pushed the codex/fumadb-cutover branch from 20f4ed0 to f962a13 Compare May 14, 2026 18:41
Comment thread apps/cli/src/build.ts
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why'd we remove embedded migrations

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was removed because the local app no longer runs Drizzle migrations from disk. Local now builds the FumaDB SQLite schema from collectTables(...) at startup via FumaDB/Drizzle runtime schema generation, and the legacy SQLite cutover imports rows directly from the old DB into the new Fuma DB. So there is no migration folder for the CLI binary to embed anymore; keeping the old embedded Drizzle migration module would be dead code.

# Conflicts:
#	bun.lock
#	packages/core/storage-core/package.json
#	packages/core/storage-drizzle/package.json
#	packages/plugins/mcp/src/sdk/probe-shape.test.ts
#	packages/plugins/mcp/src/sdk/probe-shape.ts
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 15, 2026

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@817

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@817

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@817

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@817

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@817

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@817

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@817

@executor-js/plugin-google-discovery

npm i https://pkg.pr.new/@executor-js/plugin-google-discovery@817

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@817

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@817

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@817

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@817

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@817

executor

npm i https://pkg.pr.new/executor@817

commit: c1e16a7

@RhysSullivan RhysSullivan marked this pull request as ready for review May 15, 2026 03:53
@RhysSullivan RhysSullivan merged commit 50d7a91 into main May 15, 2026
11 checks passed
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.

1 participant