Skip to content
HomeNewsConceptsGuidesToolbox
AboutSubscribeUA
Subscribe

AI Today Brief

The daily AI-engineering brief. Built in public. EN · UA.

XTelegramLinkedInYouTubeRSS

Follow AI Today Brief on LinkedIn for daily AI-engineering updates and the weekly “5 shifts that changed how developers work” PDF.

Explore

NewsDigestsConceptsGuides

Company

SubscribeAdvertiseAbout

Legal

Editorial policyAI disclosurePrivacyTerms

© 2026 AI Today Brief. All rights reserved.

  1. Home/
  2. News/
  3. Tutorials & guides/
  4. Generating TLA+ Verification Models for Distributed Systems Using AI Agents
Tutorials & guides

Generating TLA+ Verification Models for Distributed Systems Using AI Agents

Depot used AI agents to translate Go database transactions and S3 API calls directly into TLA+ formal specifications. The TLC model checker evaluated over 14 million states to discover a subtle race condition in container registry garbage collection.

August 15, 2026· 6 min read
OKCurated by Oleksandr Kuzmenko, AI Product Engineer·Updated August 15, 2026·Sources cited on every story
AI-assisted · editor-reviewed·How we use AI
Generating TLA+ Verification Models for Distributed Systems Using AI Agents

Impact: High

Why it matters

You can now delegate tedious TLA+ syntax generation to AI agents, leaving engineers to focus purely on defining critical system invariants.

TL;DR

  • 01Use AI coding agents to translate multi-step backend logic into TLA+ state machine modules.
  • 02Combine model checking with human code reviews focused on invariant definitions rather than syntax.
  • 03Implement object versioning in blob stores as a delete fence to prevent race conditions during garbage collection.

Key facts

States explored
14,290,224 distinct states
Model checker runtime
~21 minutes
Verified properties
10 safety invariants, 2 liveness properties
Storage key format
blobs/sha256/<digest>

Solving the High Cost of TLA+ Spec Creation

Formal verification with Temporal Logic of Actions (TLA+) and the TLC model checker provides mathematical proof of system correctness, but hand-writing specifications has historically been too time-consuming for standard development cycles. Depot bypassed this hurdle by using AI agents to translate existing Go code, SQL queries, and S3 transactions directly into TLA+ specs. Developers then focus strictly on defining safety invariants while human review validates the abstractions.

Catching Concurrency Races in Garbage Collection

During the rebuild of the Depot Registry garbage collector, the TLC model checker evaluated 14,290,224 distinct states across 10 safety invariants and 2 liveness properties in approximately 21 minutes. It uncovered a critical race condition where a garbage collection worker verified zero references and initiated deletion at blobs/sha256/<digest>, while a client concurrently re-uploaded the exact same content-addressed blob and committed a new manifest.

S3 Versioning as a Safe Delete Fence

Because database references in MySQL and blob storage in S3 cannot be updated in a single atomic cross-system transaction, traditional re-checking fails. Depot resolved this by turning on S3 bucket versioning as a delete fence. The garbage collector captures a specific version ID v1 during the mark phase and explicitly deletes only v1. If a concurrent upload occurs, it receives version v2, keeping active manifest references intact without locking.

Try it in 2 minutes

ManifestNeedsData == \A p \in PusherIDs: manifestExists[p] => s3Versions /= {}

tla

✓ When to use

  • Verifying non-atomic distributed transactions across relational databases and object storage.
  • Designing asynchronous garbage collection or background reconciliation loops.
  • Automating formal specification syntax drafting with LLM agentic tools.

What to do today

  • →Prompt your agent to extract database transaction steps and convert them into TLA+ state transitions.
  • →Verify state-machine edge cases in distributed systems using the TLC model checker.
  • →Enable S3 versioning on content-addressed stores to scope deletion operations to explicit version IDs.
#TLA+#TLC#Go#MySQL#S3#Depot Registry

Sources

  • Improving system safety with Temporal Logic of Actions (TLA+)
ShareShare on XShare on LinkedIn
← Previous storyChatGPT Codex Automation Workflows: Social Scanning, App Publishing, and Remote ControlNext story →HN Without AI: Filtered Hacker News Mirror Stripping Artificial Intelligence Stories

Related stories

  • Tutorials & guidesJetBrains and UPenn Studies Identify Negative Expertise in AI-Assisted Coding
  • Tutorials & guidesBuilding 5-Microsecond JIT Compilers with AI and Copy-and-Patch Stencils
  • Tutorials & guidesStructuring Agent Workflows with Deterministic Feedback and Test-Driven Development
  • Tutorials & guidesStructuring Software Seams and Deterministic Validation for Coding Agents

Email digest

Get the morning AI brief

One email a day — the stories that matter for engineers, founders and tech leads. Human-edited, with links to primary sources.

  • ✓120+ sources scanned daily
  • ✓Edited by a human
  • ✓1 email per day
  • ✓EN + UA

By subscribing you agree to the privacy policy.