· ai-devtools

How we continuously validate formal specifications in production

Formal specifications can help engineers reason about complex distributed systems and verify critical correctness properties.


But they remain valuable only as long as they reflect reality. At Datadog, we encountered this challenge while working on Husky, our event database. We had a formally verified model of Husky's routing system that matched production behavior when we created it.

Over time, though, Husky evolved, and a change to its placement logic allowed conflicting placements to persist in production for about a year. Although harmless during normal operation, just two conflicting placements would have caused Husky’s backfill system to crash while recovering from placement data loss. We found the issue not by triggering that failure, but by checking production behavior against our TLA+ specifications.

That raised a question: How do you know when a specification has drifted away from the system it was meant to describe? To answer that question, we built FETCh (Formal Execution Trace Checker), a system that turns TLA+ specifications into runtime monitors.

Related coverage

Also worth reading

  1. Fireworks says you’re wasting money on AI unless you’re using all the models
  2. How Grab Improved Mobile App Stability by Safely Handling Surge in AI-Generated Code Changes
  3. Open Source pg_vectorsearch Brings More Scalable Vector Search to PostgreSQL
  4. How are you dealing with all the negative side effects of AI on the web?
  5. Meridian browser, Servo and GPUI, experimental web browser release