futuctual.it

TLDR; of actual future news

AIfutuctual.it

AWS launches Project C2: AI tool that proves code correctness to catch rare bugs

The new service uses mathematical proofs generated by large language models to find reliability errors that standard testing misses.

AWS launches Project C2: AI tool that proves code correctness to catch rare bugs

AWS announced on Monday a new capability called Project C2, designed to identify the subtle reliability bugs that even today's most advanced artificial intelligence models overlook. Short for Code Confidence, the tool leverages large language models to generate mathematical proofs about software code rather than relying solely on traditional test cases. The company stated it has already deployed C2 to discover more than 800 bugs across 22 popular open source projects and is currently testing it against internal services including Amazon Aurora, Amazon DynamoDB, and Amazon Elastic Block Store (EBS). While the technology is impressive, AWS noted that general access for external developers is not yet available; only a limited number of customers will receive early access.

Proofs instead of tests

Marc Brooker, an AWS Distinguished Engineer, and Soonho Kong, a Principal Applied Scientist who previously worked on Microsoft Research's Lean theorem prover, explained the core logic behind the tool in their announcement materials. They argued that complex distributed systems involve scenarios far too numerous for any human or model to simulate individually. For instance, they noted that a single round of agreement between three machines running the Paxos consensus protocol can occur in more than 90,000 different orders. When accounting for dropped packets and retries, the number of potential scenarios grows exponentially, making exhaustive testing impossible.

" Just like we can know that a proof of Pythagoras's theorem is correct without trying every possible triangle, the proofs this approach writes can generalize to all orderings without trying them all," Brooker and Kong wrote in their announcement. By using formal verification, C2 aims to ensure code behaves correctly across every logical possibility rather than just the specific cases it has been tested against.

How Project C2 works

The workflow begins with C2 reading a project's source code and documentation to understand its intended behavior. Once this context is established, the system attempts to prove that the actual implementation matches those specifications. If the proof fails, C2 either refines its understanding of the system or flags a bug if there is a genuine mismatch between intent and reality.

To close the loop on any discovered issue, the tool performs three additional steps: it writes a specific test case designed to trigger the bug, rates the severity of the error, and drafts a fix that it subsequently proves correct. AWS highlighted that its internal teams have utilized automated reasoning for about a decade on their own infrastructure. Earlier this year, they extended these techniques to developers through features like Kiro’s requirements analysis feature, which allows users to define system requirements in natural language and have the AI generate code that satisfies them.

Security scanners and simulators

While many recent AI-driven bug detection tools launched over the past year focused primarily on security vulnerabilities, Project C2 targets a different class of problem: reliability bugs. These are errors that often reside in error-handling or failure-management code paths which rarely execute under normal conditions but can cause system instability when they do occur. AWS explicitly stated that these are not the types of exploits typically targeted by attackers.

The company suggested Antithesis as a closer comparison for this use case, noting that Antithesis runs entire distributed systems inside a deterministic hypervisor and injects faults to break them. However, AWS pointed out a key distinction: Antithesis testing only covers the specific orderings it explores, whereas C2's mathematical proof covers all of them. They cited etcd as an example of a system already running robustness tests on Antithesis. Additionally, they highlighted a bug found by C2 that mirrors an issue Brooker filed against etcd in early November regarding how leaders handle lease revocation when losing status mid-batch. Another example involved an in-memory database that cleared a disk-error flag after a successful retry, despite the fact that Linux does not guarantee earlier writes reach the disk immediately upon success.

Finding bugs is the easy part

AWS acknowledged that identifying these bugs might be straightforward compared to the challenge of fixing them and getting updates deployed quickly. They pointed out a wider industry trend where disclosing vulnerabilities is easier than patching them, citing Anthropic's data as an example. Although Anthropic has disclosed 5,087 vulnerabilities across 680 open source projects, only 629 had been patched by early November. This gap suggests that while tools like Project C2 can find errors effectively, the operational bottleneck often lies in the speed at which organizations can apply fixes to their live systems.

More news