Quality gate
A quality gate is a pass-or-fail check a change must clear before it moves on. What it checks, why it matters for AI code, and how AI CodeOps applies it.
A quality gate is an automated pass-or-fail checkpoint that a code change must clear before it moves to the next stage, such as becoming a pull request, merging or deploying. The gate turns several signals (tests, review results, approvals) into one decision.
What it is
A gate has a set of conditions and a verdict. Typical conditions are "the tests pass", "no critical issues are open" and "a reviewer approved". If any condition fails, the change stops and the gate says why. Gates usually sit at a transition: before merge, before release, before production.
Good gates are explicit about what they don't know. A review that never ran isn't a clean review, and a missing result shouldn't count as a pass.
Why it matters
AI agents can write changes faster than people can read them. A gate keeps the bar the same for every change, whoever or whatever wrote it, and it records why a change was held. Without one, the only thing between generated code and your main branch is someone's attention on a busy day.
In AI CodeOps
Every AI session ends with a diff. Before it can become a pull request, AI CodeOps checks, in order:
- The workspace policy: a deny stops it, an ask needs an approved review.
- The approval: a pending or rejected approval stops it.
- The quality gate itself: tests didn't fail on the current version, the AI findings review completed, and no high or critical finding is still open, acknowledged or in progress.
The run page's Quality gates panel shows Release-ready or Gate checks pending, with the reasons. The same gate runs again before the console merges a pull request a session opened.
Your CI can ask the same question for any pull request or commit:
curl -s -X POST "https://console.aicodeops.dev/api/release/check" \
-H "Authorization: Bearer $WORKSPACE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"pullRequestURL":"https://github.com/acme/api/pull/42","blockingSeverity":"medium"}'
A denied answer, trimmed:
{
"allowed": false,
"summary": "HIGH security: Coupon code is passed to the pricing query without validation",
"reasons": ["HIGH security: Coupon code is passed to the pricing query without validation"],
"testFailures": [],
"coverageShortfall": null
}
The endpoint answers HTTP 200 either way, so a CI step should read allowed. If no session touched the change, it's denied: the gate has nothing to judge. The CI check can also enforce a coverage floor, a license policy, required workflows and a prior deployment. The full field list is in the API reference.
Related terms
- Deploy gate: the same idea applied to releasing into an environment.
- Human-in-the-loop: the approval that sits next to the automated checks.
- Static application security testing (SAST): one kind of signal a gate can consume.
Frequently asked questions
Is a quality gate the same as a CI check?
A CI check is one signal. A quality gate is the decision built on several signals, such as tests, review findings and approvals, that says whether the change may move on.
What happens in AI CodeOps if the gate itself errors?
The change is refused. The gate fails closed, so an error during the check never lets a change through.
Can my CI pipeline ask the AI CodeOps gate for a verdict?
Yes. POST /api/release/check with a workspace API key and a pull request URL or commit SHA returns allowed true or false with the reasons.