Skip to content

Comments

fix(turso): initialize runtime sqlite pragmas for local db#32

Merged
dustintownsend merged 1 commit intomainfrom
codex/release-e2e-turso-redis
Feb 9, 2026
Merged

fix(turso): initialize runtime sqlite pragmas for local db#32
dustintownsend merged 1 commit intomainfrom
codex/release-e2e-turso-redis

Conversation

@dustintownsend
Copy link
Contributor

Summary

  • configure runtime local SQLite connections in Turso world with PRAGMA journal_mode = WAL and PRAGMA busy_timeout = 5000
  • run pragma initialization once per cached client key to avoid duplicate initialization work
  • add a new unreleased changeset for @workflow-worlds/turso only

Why

busy_timeout is connection-scoped. The setup CLI already applies pragmas on its own connection, but runtime world connections also need this configuration. Without it, upstream Turso e2e can hit transient SQLITE_BUSY: database is locked failures that cascade into timeouts.

Validation

  • pnpm --filter @workflow-worlds/turso test

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

Benchmark Comparison

Cross-comparison of workflow performance across World implementations.

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

World Workflow Time Wall Time Overhead vs Fastest
🥇 💾 Starter (in-memory) 0.015s (+1.4%) 1.006s (~) 0.992s 1.00x
🔴 Redis 0.020s (+1.0%) 1.009s (~) 0.989s 1.41x
💻 Local 0.033s (+19.4% 🔺) 1.007s (~) 0.974s 2.25x
🗄️ Turso 0.088s (+139.9% 🔺) 1.011s (~) 0.924s 6.06x
🍃 MongoDB 0.091s (+97.0% 🔺) 1.010s (~) 0.919s 6.28x

workflow with 1 step

World Workflow Time Wall Time Overhead vs Fastest
🥇 💾 Starter (in-memory) 0.043s (+4.1%) 1.005s (~) 0.961s 1.00x
🔴 Redis 0.056s (+0.5%) 1.008s (~) 0.952s 1.29x
💻 Local 0.080s (-17.9% 🟢) 1.006s (~) 0.926s 1.83x
🍃 MongoDB 0.266s (-3.9%) 1.009s (~) 0.743s 6.12x
🗄️ Turso 0.286s (+18.1% 🔺) 1.010s (-1.2%) 0.724s 6.58x

workflow with 10 sequential steps

World Workflow Time Wall Time Overhead vs Fastest
🥇 💾 Starter (in-memory) 0.338s (+0.8%) 1.005s (~) 0.666s 1.00x
🔴 Redis 0.425s (~) 1.007s (~) 0.582s 1.26x
💻 Local 0.639s (-1.6%) 1.006s (~) 0.367s 1.89x
🗄️ Turso 2.112s (~) 3.012s (~) 0.900s 6.24x
🍃 MongoDB 2.143s (+0.6%) 3.011s (~) 0.868s 6.33x

workflow with 10 parallel steps

World Workflow Time Wall Time Overhead vs Fastest
🥇 💾 Starter (in-memory) 0.139s (+7.1% 🔺) 1.004s (~) 0.865s 1.00x
🔴 Redis 0.170s (+4.4%) 1.007s (~) 0.838s 1.22x
💻 Local 0.275s (-0.8%) 1.006s (~) 0.730s 1.98x
🍃 MongoDB 1.539s (-1.5%) 2.008s (~) 0.469s 11.07x
🗄️ Turso 1.590s (+0.9%) 2.010s (~) 0.420s 11.44x

Stream Benchmarks

Stream benchmarks include Time to First Byte (TTFB) metrics.

workflow with stream

World Workflow Time TTFB Wall Time Overhead vs Fastest
🥇 💾 Starter (in-memory) 0.071s (-0.7%) 1.002s (~) 1.005s (~) 0.934s 1.00x
🔴 Redis 0.091s (+2.1%) 1.002s (~) 1.007s (~) 0.915s 1.29x
💻 Local 0.138s (-1.4%) 0.992s (~) 1.009s (~) 0.871s 1.94x
🍃 MongoDB 0.467s (-5.9% 🟢) 0.962s (+2.8%) 1.008s (~) 0.541s 6.61x
🗄️ Turso 0.486s (+9.4% 🔺) 0.947s (-4.0%) 1.009s (~) 0.523s 6.88x

Summary: Average Performance by World

World Avg Workflow Time Benchmarks
💾 Starter (in-memory) 0.121s 5
🔴 Redis 0.153s 5
💻 Local 0.233s 5
🍃 MongoDB 0.901s 5
🗄️ Turso 0.913s 5
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • vs Fastest: How much slower compared to the fastest World for this benchmark

Worlds:

  • 💻 Local: Built-in workflow world
  • 🐘 Postgres: PostgreSQL database world
  • ▲ Vercel: Vercel production world
  • 💾 Starter: In-memory reference implementation
  • 🍃 MongoDB: MongoDB database world
  • 🔴 Redis: Redis/BullMQ backend

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

❌ E2E Test Results

World Passed Failed Skipped Total
MongoDB 44 1 3 48
Redis 45 0 3 48
Turso 45 0 3 48
Total 134 1 9 144

Failed Tests

MongoDB — 1 failed
  • e2e webhookWorkflow

    AssertionError: expected '' to be 'Hello from webhook!' // Object.is equality

View workflow run

@dustintownsend dustintownsend merged commit 483d576 into main Feb 9, 2026
19 of 20 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