Ephyra: A new agentic property-based testing library to find the bugs you missed
- Source
- datadoghq.com
- Date

Context
Ephyra is an open-source testing library from Datadog in which coding agents write the programs that generate test inputs, and Datadog says running it on 26 well-tested open-source systems turned up 535 previously unknown bugs, of which maintainers have so far confirmed 373 and fixed 313 (Datadog). They include a memory-safety crash that had been in OCaml for 24 years, a PostgreSQL parsing bug at least 21 years old, and database corruption that had been in SQLite for nearly 13 years. The post is by Datadog research scientist Alp Keles, and an accompanying paper is due at the Future of Property-Based Testing workshop at POPL 27 in January.
The method builds on property-based testing, which replaces hand-picked test cases with rules. An engineer states a property that must hold for every input, such as that sorting a list keeps every element including duplicates, and a generator produces random inputs that try to break it; when one does, the library shrinks it to a small example that still shows the bug. Writing a generator that produces valid, varied inputs, such as well-formed SQLite database files, normally takes significant time and expertise. In Ephyra, engineers still define the properties, while agents write and keep improving the generators using feedback from test runs, steering toward higher code coverage. Each feature added to the generator lets the tests reach that part of the system and its interactions with features already covered. That division differs from research by MATS, Anthropic and Northeastern University covered in October, where an proposed the properties themselves for Python functions.
The PostgreSQL bug shows the kind of failure such inputs expose. PostgreSQL rewrites the expression a BETWEEN b AND c into two comparisons that each carry a copy of a, so nesting doubles the work at every level. Datadog says a 670-byte query nested 26 levels deep needed nearly 100 GB of memory to parse and could not be canceled.
The bug count is strong evidence that agent-improved generators find real defects in mature software, but Datadog is explicit about what it does not show. Its experiments used a classical property-based testing loop that it says should be reproducible in any library supporting handwritten generators and shrinkers, and it says the work "does not yet validate" Ephyra's design choices. The team personally validated and submitted every bug report, and it has not yet measured how consistently the approach finds a given bug or what it costs in time, compute and ; those controlled experiments are its next step. Ephyra is written in Rust but can test software in other languages, including C++ and Python, and Datadog labels it an experimental research project, not a supported product.
- Across 26 well-tested open source systems, Datadog reports 535 previously unknown bugs, 373 confirmed by maintainers and 313 already fixed. Each was validated with a minimal reproducer before being reported upstream.
- The split is humans write properties, agents write generators: engineers define rules such as Ternary Logic Partitioning for 's three-valued logic, and the writes and improves the random input generators using feedback from test runs.
- Bug ages show what the loop reaches: a 24-year-old OCaml memory-safety crash from a non-exhaustive match, a 21-year-old PostgreSQL blowup where each nested BETWEEN doubled parsing memory toward 100 GB, and a 13-year-old SQLite corruption from three DELETEs.
- Datadog is explicit that the results do not yet validate Ephyra's own design. The experiments used a classical property-based testing loop, so they should reproduce in any library with handwritten generators and shrinkers.
- Ephyra is Rust, experimental, and not a supported Datadog product, though it can test code in other languages including C++ and Python. Researchers still validated and filed every one of the 535 reports themselves rather than letting the agent do it.
- Agent — A system in which a model repeatedly chooses operations, a harness carries them out, and the results return to the model to inform its next choice.
- Token — A piece of text, such as a word, part of a word or a punctuation mark, that a language model represents as numbers and handles as a unit.
- Database and SQL — Persistent structured storage queried and changed through explicit operations.
- Agent mode — A mode in which one agent can inspect, edit, run commands, and iterate toward an outcome.
Checking sign-in…
Loading comments…


