← Back to the blogVerifying AI code

What a Release Gate for AI-Written Code Actually Needs

Review says whether code is well written. A release gate must say whether it does what was decided. Four ideas from our white paper.

November 4, 2026 · 5 min read

Pull requests arrive faster, they are larger, and a growing share of each one was written by an assistant. In Faros AI’s The AI Productivity Paradox (July 2025, 10,000 developers across 1,255 teams), teams using AI merged 98% more pull requests, and time spent in review rose 91%. In Sonar’s State of Code Developer Survey (January 2026, more than 1,100 developers), 96% said they don’t fully trust that AI-generated code is functionally correct, and only 48% said they always check it before committing.

That describes a queue, not careless engineers. When changes grow faster than the people who can judge them, review gets thinner, and adding reviewers only helps at the margin.

The more useful question is what a reviewer is being asked to verify, and whether a release can be gated on the answer. Here is what we think that takes.

Review answers a different question

Code review, human or automated, is good at what it reads: style, likely bugs, risky patterns, convention issues. All properties of the code itself.

Now suppose a pricing rule says a downgrade takes effect at renewal, and the diff applies it immediately. The code may still be clean, tested and idiomatic. Nothing in the diff says it’s wrong, because the rule it violates isn’t in the diff.

That’s a structural limit, and it applies equally to people and to models. “Is this code well written?” is answered by reading the code. “Does this code do what was decided?” needs a reference outside the code. Keep review. Add the second question.

The reference has four properties

Intent usually lives in tickets, wiki pages, design files and the memory of the two people who were in the meeting. A refund window might be 14 days in a ticket, 30 in the wiki and 21 in the code. The code is the source of the implementation, not of what you meant to build.

A spec you can verify against has four properties. It is structured: features, journeys, actions, business rules, screens, objects, invariants and testable requirements are separate, named elements, alongside the architecture, data model, APIs and flows that implement them. It is linked to code: each rule points to the files, services and tables behind it. It is linked to sources: each element remembers where it came from, and contradictions are flagged rather than silently resolved. And it is validated: the business owner has approved it. Verification against an unvalidated spec only proves consistency with a guess.

The gate has to be deterministic

Adding a second model to review the first helps with review questions. As a release gate, it stacks one probability on another.

A deterministic check gives the same verdict on the same code and spec, through a computation you can replay. Three things follow. If a check can pass on Tuesday and fail on Wednesday on unchanged code, teams learn to rerun it until it turns green, and the check becomes a ritual. A deterministic gap stays open until someone changes the code or the spec. For a CISO or a compliance function, “the model said it was fine” is not evidence, while a verdict that names the rule, the code and the result can be re-run by an auditor months later. And a policy like “no release ships with an open regression on a payment rule” is only enforceable if the check behind it is stable.

AI stays in the process. Models remain excellent at writing code and drafting specs. The control step, the one that says “conformant” or “not conformant”, shouldn’t depend on a probability.

Decide your measures before the pilot

The white paper recommends a pilot on one or two modules where a wrong rule is expensive and AI-assisted changes are frequent: billing, pricing, eligibility, permissions, regulatory reporting. Record a baseline first. Useful measures need no special tooling: rules validated in scope, contradictions found between sources, gaps per change by type, gaps that review and tests didn’t flag, passes needed to reach full conformance, reviewer time spent on business-rule questions, and, over a longer period, incidents traced to a business rule.

At the end, either the verification layer found gaps nothing else caught, or your existing process already covers that scope. Both outcomes are useful.

In the white paper

The full white paper runs 15 pages. It walks through a subscription billing example where one change produces an addition, an omission and a regression at once, details the six-step verification loop with who acts at each step, places spec verification next to human review, AI review, tests and static analysis, covers governance and deployment questions, and ends with a glossary. To see the loop on real code, book a demo.

Go further

White paper · free · 15 pages

Verifying AI-written code: a deterministic approach

The verification gap in numbers, the three gaps to look for, why the check must be deterministic, and how a verification loop fits next to code review.

Keep your software in tune

Start with one module. Lyriks recovers its spec, then verifies every change. All it needs is your repository.