Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
tursodatabase avatar

Differential Fuzzer

  • 916 installs
  • 23.5k repo stars
  • Updated July 28, 2026
  • tursodatabase/turso

differential-fuzzer is an agent skill that documents Turso's differential fuzzer for developers who generate random SQL, compare Turso against SQLite, and surface correctness divergences before production.

About

differential-fuzzer is a Turso repository skill that explains how to run the differential oracle fuzzer located at testing/differential-oracle/fuzzer/. The tool generates random SQL—default 100 statements per basic cargo run—and compares Turso results to SQLite to find correctness bugs, with flags for --seed reproducibility and verbose output. Developers reach for it when validating database engine changes or investigating suspected SQL semantic drift. The skill directs agents to load the related Turso debugging skill alongside fuzzer runs for triage context.

  • Compares Turso query results against SQLite on thousands of randomly generated SQL statements
  • Supports single-run, loop, and Docker CI modes with configurable seed, statement count, table count and column count
  • Always load alongside the Debugging skill for reference and deeper root-cause analysis
  • Outputs failing SQL, diff details, and optional persisted database files for reproduction
  • Designed specifically to catch subtle correctness bugs unique to Turso’s distributed implementation

Differential Fuzzer by the numbers

  • 916 all-time installs (skills.sh)
  • +45 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #544 of 2,184 Testing & QA skills by installs in the Skillselion catalog
  • Security screen: HIGH risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/tursodatabase/turso --skill differential-fuzzer

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs916
repo stars23.5k
Security audit2 / 3 scanners passed
Last updatedJuly 28, 2026
Repositorytursodatabase/turso

How do you fuzz-test Turso SQL against SQLite?

Automatically generate random SQL, run it against both Turso and SQLite, then surface correctness divergences that would otherwise reach production.

Who is it for?

Database engineers and Turso contributors running correctness regression tests on SQL execution paths.

Skip if: Application teams seeking UI or API load tests without access to the Turso Rust fuzzer workspace.

When should I use this skill?

The user runs or debugs differential_fuzzer, asks about Turso-SQLite correctness, or works under testing/differential-oracle/fuzzer.

What you get

Fuzzer run logs, reproducible seeds, and reported Turso-versus-SQLite result divergences from generated SQL.

  • Fuzzer run output
  • Reproducible seed commands
  • Turso-SQLite divergence reports

By the numbers

  • Basic fuzzer run generates 100 SQL statements by default
  • Fuzzer located at testing/differential-oracle/fuzzer

Files

SKILL.mdMarkdownGitHub ↗

Differential Fuzzer

Always load Debugging skill for reference

The differential fuzzer compares Turso results against SQLite for generated SQL statements to find correctness bugs.

Location

testing/differential-oracle/fuzzer/

Running the Fuzzer

Single Run

# Basic run (100 statements, random seed)
cargo run --bin differential_fuzzer

# With specific seed for reproducibility
cargo run --bin differential_fuzzer -- --seed 12345

# More statements with verbose output
cargo run --bin differential_fuzzer -- -n 1000 --verbose

# Keep database files after run (for debugging)
cargo run --bin differential_fuzzer -- --seed 12345 --keep-files

# All options
cargo run --bin differential_fuzzer -- \
  --seed <SEED>           # Deterministic seed
  -n <NUM>                # Number of statements (default: 100)
  -t <NUM>                # Number of tables (default: 2)
  -c <NUM>                # Columns per table (default: 5)
  --verbose               # Print each SQL statement
  --keep-files            # Persist .db files to disk

Continuous Fuzzing (Loop Mode)

# Run forever with random seeds
cargo run --bin differential_fuzzer -- loop

# Run 50 iterations
cargo run --bin differential_fuzzer -- loop 50

Docker Runner (CI/Production)

# Build and run from repo root
docker build -f testing/differential-oracle/fuzzer/docker-runner/Dockerfile -t fuzzer .
docker run -e GITHUB_TOKEN=xxx -e SLACK_WEBHOOK_URL=xxx fuzzer

Environment variables for docker-runner:

  • TIME_LIMIT_MINUTES - Total runtime (default: 1440 = 24h)
  • PER_RUN_TIMEOUT_SECONDS - Per-run timeout (default: 1200 = 20min)
  • NUM_STATEMENTS - Statements per run (default: 1000)
  • LOG_TO_STDOUT - Print fuzzer output (default: false)
  • GITHUB_TOKEN - For auto-filing issues
  • SLACK_WEBHOOK_URL - For notifications

Output Files

All output goes to simulator-output/ directory:

FileDescription
test.sqlAll executed SQL statements. Failed statements prefixed with -- FAILED:, errors with -- ERROR:
schema.jsonDatabase schema at end of run (or at failure)
test.dbTurso database file (only with --keep-files)
test-sqlite.dbSQLite database file (only with --keep-files)

Reproducing Errors

Always follow these steps

1. Find the seed in the error output:

   INFO: Starting differential_fuzzer with config: SimConfig { seed: 12345, ... }

2. Re-run with that seed:

   cargo run --bin differential_fuzzer -- --seed 12345 --verbose --keep-files

3. Check output files:

  • simulator-output/test.sql - Find the failing statement (look for -- FAILED:)
  • simulator-output/schema.json - Check table structure at failure time

4. Create a minimal reproducer

  • Create reproducer in .sqltest or in .rs always load Debugging skill for reference

5. Compare behavior manually: If needed try to compare the behaviour and produce a report in the end. Always write to a tmp file first with Edit tool to test the sql and then pass it to the binaries.

   # Run failing SQL against SQLite
   sqlite3 :memory: < simulator-output/test.sql

   # Run against tursodb CLI
   tursodb :memory: < simulator-output/test.sql

Understanding Failures

Oracle Failure Types

1. Row set mismatch - Turso returned different rows than SQLite 2. Turso errored but SQLite succeeded - Turso rejected valid SQL 3. SQLite errored but Turso succeeded - Turso accepted invalid SQL 4. Schema mismatch - Tables/columns differ after DDL

Warning (non-fatal)

  • Unordered LIMIT mismatch - LIMIT without ORDER BY may return different valid rows

Key Source Files

FilePurpose
main.rsCLI parsing, entry point
runner.rsMain simulation loop, executes statements on both DBs
oracle.rsCompares Turso vs SQLite results
schema.rsIntrospects schema from both databases
memory/In-memory IO for deterministic simulation

Tracing

Set RUST_LOG for more detailed output:

RUST_LOG=debug cargo run --bin differential_fuzzer -- --seed 12345

Related skills

FAQ

Where is the Turso differential fuzzer located?

differential-fuzzer documents the tool at testing/differential-oracle/fuzzer in tursodatabase/turso, run with cargo run --bin differential_fuzzer.

How many SQL statements does a basic fuzzer run use?

differential-fuzzer notes a basic cargo run --bin differential_fuzzer executes 100 randomly generated SQL statements unless additional flags change the run.

Is Differential Fuzzer safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.