The reading room · Digna Legi
How we continuously validate formal specifications in production
/100
80–100: high value. 70–79: worth the time. Below 70: below the usual publication threshold.
Evidence-reviewed score based on available publisher text. The supplied text is sampled and contains gaps. Reported production measurements and outcomes are not independently verified, and omitted implementation details cannot be assessed.
Scores reflect one reader’s profile, not an objective quality rating. Best is a separate personal selection.
How scoring works →This brief · about 2 min with detail
Why read this
A verified model can stay internally correct while production drifts; checking actual transitions can expose failures hidden behind healthy operation.
AI brief · Checked against source text
The main idea
Formal verification establishes properties of a model, but its usefulness depends on whether the implementation still follows that model as software changes. Datadog’s FETCh converts formal specifications into runtime monitors that check production events against allowed transitions, keeping the connection between design reasoning and deployed behavior open to continuous scrutiny.
Technical reading. Distributed systems, state transitions, and code; TLA+ specifies formal behavior, while Rust implements the monitor.
Go a little deeper
Healthy properties can conceal illegal transitions
A condition that must always hold checks less than the complete rules governing behavior. In the lock-server example, preventing a lock from being acquired twice preserves the chosen invariant, yet releasing it twice remains possible. Checking each action’s preconditions catches that forbidden transition. The distinction matters when a reassuring property covers only one way the implementation can go wrong.
Connect abstraction levels explicitly
Production observation needs rules that accept a continuing stream of inputs; exhaustive model checking needs bounded inputs so the possible states remain manageable. Datadog connects these through refinement: every behavior permitted by the bounded specification must also be permitted by the observable specification. This gives the two specifications distinct jobs while maintaining a formal relationship between them.
Put state where the obligation lives
A placement assigns event-identifier ranges to lists of routing destinations, called shards. Tracking trillions of event identifiers centrally was impractical. Datadog instead checks placement overlap globally and correct placement use within each routing process, with a proof connecting those obligations to consistent routing. Local checks avoid transmitting a validation payload for every event and retaining local state across restarts. The smaller global placement history uses disk-backed storage.
A case from the article
A balancing change broke recovery assumptions
A balancing optimization deliberately allowed conflicting placements in special cases, but those placements were also being persisted. They remained harmless during normal operation; just two conflicting placements would have crashed backfill during recovery from placement data loss. FETCh detected the stored conflicts before that failure occurred. After Datadog stopped persisting them, it reported no further violations in monitored traffic.
How the case is made
The account combines worked specifications, a production deployment, reported resource measurements, and a discovered placement-storage defect.
Where the idea has limits
FETCh supports only part of TLA+ and currently checks preconditions against the current state. Deployment requires instrumentation, while monitoring global state at production scale can require system-specific engineering.
A question to take away · from Digna Legi
Which recovery assumptions could your system violate today without producing any visible problem during normal operation?
What the original adds
The original includes specification-to-monitor translation examples, annotations for generating process-local checks, and measured CPU and memory overhead from Datadog’s deployment.
About this brief
AI-written, then separately checked for source support, useful detail and clarity. The author’s claims and our editorial question are kept separate. The original remains the author’s work. How we select and summarise →
How was this brief?
Rate this summary, separately from the author’s article.
Optional. Saved in this browser; shared only if you allow analytics.
How was the original article?
Rate the author’s original after reading it.
Optional. Saved in this browser; shared only if you allow analytics.
Digna legi. Worth reading.