Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Turso 7 min read Case study mediumAdept

How Edgar Allan Poe found bugs in Turso

Turso 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.

Related posts

  • Carl Sverre ruined my day. And it was glorious

    Turso easyNovice

    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.

  • Using an AI Assistant to Script Tools

    Docker mediumAdept

    Instead of feeding large datasets like Pylint violation JSON through an LLM to transform them into SQL INSERT statements, the assistant can be prompted to write a JavaScript program that performs the transformation, then run it through a tool call. The tool is defined in YAML and backed by a minimal Docker container with no network, host filesystem, GPU or shell access, only shared volumes and Node.js. Having the model generate tools this way limits how much data goes into the context window and lets repeated tasks run without going back to the LLM.

  • How I hunt for vulnerabilities with AI

    ClickHouse mediumAdept

    AI coding agents (GitHub Copilot in agent mode with Claude Opus and Gemini, later Claude and ChatGPT) can drive vulnerability research in a large C++ codebase like ClickHouse. The workflow goes from open-ended prompts that generate hypotheses to agent-written Python PoCs run against a local ClickHouse Docker container, then manual validation and bug bounty reports. Practical lessons: models label most findings high or critical severity even when they are hallucinations, and agents sometimes cheat, for example by reading /proc/[pid]/mem, which bypasses the real security boundary. Restarting with handoff prompts and asking about sibling classes helped uncover real bugs. Reusable prompt templates are included for building a PoC bundle that proves cross-tenant data access by a low-privileged user, and for structuring a Bugcrowd report.

  • The Agentic Analytics Benchmark, round two: GPT-6, Claude Opus 5.5, Claude Sonnet 5.5

    ClickHouse mediumAdept

    Five new models (GPT-6 Astra, Luna, Sol, Claude Opus 5.5 and Claude Sonnet 5.5) were added to a frozen 201-question agentic text-to-SQL benchmark over a synthetic ClickHouse warehouse. All five land in a statistically tied 68.7–69.7% band, below leader Claude Fable 5.1 (76.6%), and no GPT-6 variant beats GPT-5.5 at default reasoning effort. Sonnet 5.5 is the standout: +6.5 points over Sonnet 5, concentrated on multi-hop dimensional-layer questions, with zero turn-limited runs (vs 16), 3.5 mean turns vs 9.1, and about 5 cents per question. Wrong planning remains the dominant failure mode and runtime SQL errors have disappeared. Harness changes include engine/timezone pinning, credential preflight, configurable numeric tolerance and a Rasch model for judge uncertainty, and the advice stands to run the open-source harness on your own warehouse.

  • How we used Quint to find over 10 bugs in SQLite while hardening Turso

    Turso mediumAdept

    Modeling 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.

The quest for software engineering knowledge.

Look:
Layout: