Carl Sverre ruined my day. And it was glorious
Turso used Antithesis's new property-based testing library Hegel to check that its two TypeScript drivers, the native @tursodatabase/database and the pure-JS @tursodatabase/serverless, expose the same API and return identical results. With Claude setting up the harness, the first run found a bug within minutes. Expanding the generated inputs, such as adding RETURNING statements that stress serialization, surfaced four more edge-case bugs. Treating driver equivalence as a testable property gave the team enough confidence to start recommending the serverless driver over libSQL.
Related posts
- How we used Quint to find over 10 bugs in SQLite while hardening Turso
Turso mediumAdeptModeling individual SQLite C API contracts in Quint, generating small traces, and replaying them as C programs against real SQLite uncovered more than 10 SQLite bugs while also validating Turso's compatible C API. Rather than specifying the whole database, each documented contract was modeled with only the state it needs, so a divergence points either to a model error or to a real bug. One example: sqlite3_deserialize() crashed instead of returning SQLITE_BUSY during an active read transaction. Other findings include wrong results from EXISTS-to-join and UPDATE planning optimizations, xfer optimization bypassing type and CHECK constraints, and mutex alignment undefined behaviour.
- How Edgar Allan Poe found bugs in Turso
Turso mediumAdeptTurso runs LLM coding agents (Claude Code with the Ralph Loop plugin) for days at a time to autonomously find SQL correctness bugs. They use differential testing against SQLite as the oracle and prompts that steer agents toward complex code, unusual query shapes and away from happy paths. When long-running agents start going in circles, injecting entropy restores exploration: priming phrases (after the Recoding-Decoding paper) or arbitrary personas. Telling a stalled agent to act like Edgar Allan Poe produced 3 novel bugs within 5 minutes after an hour with none, so the team now runs parallel agents with different personas.
- The final boss of reliability: formal verification
Turso mediumAdeptTurso, a from-scratch SQLite rewrite, is adding formal verification via Aretta AI's Aristo, which turns natural-language intents annotated on code into formally checked properties, to complement its deterministic simulation testing and Antithesis runs. Aristo found in minutes a durability bug that DST had missed. When Turso acts as a sync replica of a cloud database, it bypasses the page cache, so pages became dirty without the dirty bit being set and were sometimes written to disk without fsync. The case for the approach is that properties like "a commit frame must be fsynced before being reported durable" are cheap to check formally. Runtime testing can miss them, because most runs happen to call fsync for unrelated reasons.
- Introducing Limbo: A complete rewrite of SQLite in Rust
Turso easyNoviceLimbo is Turso's from-scratch rewrite of SQLite in Rust that aims for full language and file-format compatibility, memory safety and a modern architecture. The team chose a rewrite over the libSQL fork because invasive changes such as natural vector-index syntax and async I/O were hard to make in C without SQLite's proprietary test suite. Deterministic Simulation Testing is built in from the start, and Antithesis is used for system-level fault simulation, which has already caught io_uring partial-write bugs. Early results include a fully asynchronous sqlite3_step, a WASM-first build that works with Drizzle, fewer tunables, and a point query about 20% faster than tuned SQLite (506ns vs 620ns).
- @neondatabase/serverless hits 1.0.0
Neon mediumAdept
Neon's JavaScript/TypeScript serverless driver, which carries Postgres queries over HTTP and WebSockets for environments without raw TCP such as V8 isolates and browsers, reaches 1.0.0 after a refactor that adds auto-generated types via api-extractor and CI tests across Node, Bun, Deno, browsers, Cloudflare Workers, Vercel and the Prisma/Drizzle adapters. Tagged-template queries are now composable, because placeholder numbering is deferred until execution. A breaking change makes calling sql(...) as a plain function an error, since that form used ordinary string interpolation and invited SQL injection. New sql.query and sql.unsafe helpers cover the parameterized and trusted-raw-SQL cases. Binary inserts over HTTP now hex-encode roughly 10x faster, though WebSockets remain the recommended path for large blobs.