Coding agents can generate bespoke, instance-optimized database components with surprising speed. However, placing unverified LLM output into storage engines and query execution paths introduces catastrophic correctness risks.
Researchers from MIT, TUM, and Brown have introduced correctness firewalls: architectural boundaries where synthesized code influences only performance, never correctness. The paper establishes three distinct patterns: advisory firewalls for heuristics like cardinality estimation, guarded firewalls for binary searches on sorted arrays, and certified firewalls for compression.
In benchmarks, agent-synthesized guarded search kernels outperformed learned indexes by up to 3x, while specialized compression routines beat Zstd by 1.5x without risking data integrity.
Separating optimization heuristics from correctness verification is the key blueprint for integrating autonomous agents into mission-critical systems.














