The AI Gazette

Coding agentsEvals

Coding agents helped Datadog uncover 535 bugs in heavily tested open source software

In a post dated 24 November, Datadog researchers describe Ephyra, an open source library for agentic property-based testing. Engineers define the properties, coding agents write and refine the input generators, and Ephyra runs the tests and triages failures. Across 26 well-tested open source systems the team reported 535 previously unknown bugs upstream. Maintainers have confirmed 373 so far, and 313 are already fixed.

Illustration of a polar research camp: a dome tent with a laptop on equipment cases, a solar panel, and an ice core drill beside rows of ice cores.
Image: Datadog (opens in a new tab)

Coding agents now write a growing share of software, and checking that it behaves correctly has not become easier. The post says code review can miss subtle interactions and traditional testing is overwhelmed by the volume of AI-written code. Datadog's answer builds on property-based testing, an established technique. Engineers state a rule the code must keep for any input, such as sorting a list without changing or dropping any element, and a framework generates random inputs that try to break it. When one does, a shrinker cuts the failing input down to a small example. Writing good input generators has always taken time and expertise, so Ephyra hands that job to coding agents, which improve the generators using feedback from each test run.

The rules range from simple ones, such as never producing a memory violation, to specialized ones like Ternary Logic Partitioning, or TLP. In SQL every condition is true, false or null, so a query's result should equal the combined results of three copies of it filtered on each case. Researchers have used TLP before to find hundreds of bugs in production databases, and Datadog applied it to SQLite, Turso, PostgreSQL, DataFusion and DuckDB. In one SQLite case, a query using sum(b ORDER BY a) silently returned 1 while the three partitioned queries added up to 2.

For SQLite, the team first asked the agent to generate valid database files, then guided changes to the test harness, such as new properties or new parts of SQLite to explore. Each feature added to the generator's vocabulary can expose bugs in that feature and in its interactions with features already under test. Over 37 rounds, the generator grew from 79 to 261 SQL features, its coverage of SQLite's instrumented counters rose from 35.9% to 74.1%, and testing found 26 bugs. The post says an engineer can stay entirely outside this loop, leaving the agent to pick new regions to cover and to triage, deduplicate and locate the bugs it finds.

Across all experiments, the bugs span databases such as DataFusion and FoundationDB, language implementations such as OCaml and Lean, developer tools and infrastructure, AI tooling and formally verified systems. Each was validated with a minimal reproducer before it was reported upstream, 535 in all, and maintainers have confirmed 373, of which 313 are already fixed. The bugs ranged in age from less than a day to 24 years. A research paper describing Ephyra's design will appear at the Future of Property-Based Testing workshop at POPL 27 in January.

Several of the bugs had outlived years of testing. Three DELETE statements made SQLite report its own database as malformed, a corruption bug nearly 13 years old and the first one the team reported with Ephyra. In OCaml, a match that did not cover every case jumped through a wild pointer instead of raising an error, a memory-safety flaw in plain, safe code that had existed for 24 years. PostgreSQL rewrites a BETWEEN condition by copying one side, which doubles the work at each level of nesting; at 26 levels, a 670-byte query needed nearly 100 GB of memory to parse and could not be canceled. That bug was at least 21 years old.

Other finds were younger but no less strange. Lean 4 treated 5 and 5.0 as different patterns when matching floating-point values, and both the compiled program and Lean's proof checker returned the same wrong answer; Lean fixed it the day after the report. QED, a prover that checks whether two SQL queries are equivalent, read every decimal constant as a 32-bit float and so judged 0.1 and 0.100000001 equal. In LiteLLM, turning on streaming made the server end a tool call with a stop signal, so the agent neither answered nor ran the tool. In DuckDB, a query with LIMIT 1 returned three rows.

Ephyra is published as an open source research project in the datadog-labs/ephyra repository, with the testing library, case studies, a command line tool for running tests and inspecting results, and a Datadog integration. The post states plainly that it is experimental and not a supported Datadog product. It is written in Rust but can test software in other languages, including C++ and Python, and a startup guide explains how to drive it with a coding agent. The post offers a starter prompt that tells the agent to read the README and STARTUP.md, then write and optimize tests on its own until it finds bugs, validate and triage them, and report back.

The authors are careful about what the results show. They say the work is evidence that letting agents optimize generators on their own is an effective testing strategy, but it does not yet validate Ephyra's design choices or its place among agentic testing tools. Next they plan controlled experiments to measure how reliably the approach finds a given bug, what it costs in time, compute and tokens, and which kinds of bugs it finds. They also want to package Ephyra's agent as a standalone tool, since the team still validated and submitted every report itself, and to let agents optimize the whole testing loop rather than only the generator.

From other editions

Say hi.