# Gate a release in CI

> **Historical. This product is retired.** This page describes the earlier browser-testing product and is kept only as history. Its service, API, console and accounts are closed: do not run the install commands or call the endpoints shown here.

Run a check from a CI job and ship only when the decision is verified.

- **Outcome:** A release goes out only when the claim held on the live app.
- **Does not do:** A CI job cannot approve a plan. The first check of a claim waits until a person approves it at the link.

Gate on the decision, never the run state. A finished run is not a pass. In CI the exit code is what an if-statement reads.

## With the CLI

> **Removed.** This example called the earlier service, which is retired. Its commands and endpoints are no longer shown.

| Exit code | What it means |
| --- | --- |
| `0` | Verified. The claim held on the live app, with evidence. |
| `1` | Failed. The claim did not hold; a repair prompt is attached. |
| `2` | Blocked, or the tool could not run at all. |

The job needs `VRAELIS_API_KEY` in its environment, from a key with launch access, and Node 18 or newer. The CLI does not open a browser in CI: the approval link goes to the log. [Create an API key]((retired endpoint))

## The first check of a claim

A CI job has no person at the terminal, and a key cannot approve a plan, so the first check of a claim waits on the link until someone approves it or `--timeout` runs out. Re-checks of that approved plan need no new approval within 24 hours of the approval, up to 10 times, on the same address. A new preview URL is a different address, so its first check waits for a person again. The gate below splits the two cases instead.

## A gate that calls the API

The CLI collapses “blocked” and “could not run” into 2, because a gate should treat “I could not check” the same as “no verdict.” A hand-rolled gate that polls the API can split those out, exiting 3 when no decision is reached in the window.

> **Removed.** This example called the earlier service, which is retired. Its commands and endpoints are no longer shown.

| Exit code | What it means |
| --- | --- |
| `0` | verified |
| `1` | failed |
| `2` | blocked |
| `3` | no decision reached |
| `4` | the plan still needs a person to approve it |

| Variable | What it holds |
| --- | --- |
| `VRAELIS_API_KEY` | An API key with launch access. |
| `PREVIEW_URL` | The deployment to check. |
| `VRAELIS_CLAIM` | The sentence that has to hold. |
| `VRAELIS_REVIEWED_PLAN_ID` | The approved plan's id. Unset on the first run, so the gate prints the approval link and exits 4. |

> **Honest boundary.** Nothing watches your deployments. A check runs when a person, a CI job or an AI assistant starts one, so put it before the release step.

---

Vraelis documentation, Earlier references. https://docs.vraelis.com/ci
