Release Readiness Gate
The Release Readiness Gate answers one question from the test evidence Agnox already holds: can this project ship?
The answer is one of three verdicts:
| Verdict | Meaning |
|---|---|
Ready (READY) | Every check passed. |
Review Required (REVIEW_REQUIRED) | Nothing blocks the release, but at least one check needs a person to decide. For example, runs are missing or stale, too many tests are quarantined, or a run is still in progress. |
Blocked (BLOCKED) | At least one check failed. Typically a test failed outside quarantine. |
The gate is deterministic: no AI is involved, and the same runs and policy always give the same verdict. Every verdict comes with the checks behind it and the evidence each check used: run ids, test keys and counts.
You can read the verdict in four places:
- the Release readiness card on the Executions dashboard (Dashboard);
agnox gate checkin your CI pipeline (CI);- the Public API,
GET /api/v1/projects/{projectId}/release-readiness(Public API); - the
get_release_readinessMCP tool for coding agents (MCP).
The thresholds come from the project's policy, set in Settings → Run Settings → Release Gate Policy.
Which runs are evaluated
- Only CI and hosted runs count. Local runs from a developer machine (
source: "local") never influence a release decision. Sample (demo) runs and deleted runs are left out too. - Only finished runs count:
PASSED,FAILED,UNSTABLEandERROR. - Optional filters:
branch,commit(a full SHA, or a prefix of at least 4 hex characters),environment(development,qa,staging,production) andgroupName.
The gate then picks the release candidate:
- With
commitorgroupName, every matching run is evaluated. - Without either, the latest matching run is the anchor:
- when it belongs to a run group, the whole group is evaluated. This covers every tool and shard of one CI workflow run: Playwright, Maestro, Pytest and so on.
- otherwise, when it carries a commit, every run of that commit is evaluated;
- otherwise the anchor run alone is evaluated.
Each test counts once, with its latest outcome across the evaluated runs. A re-run of a failed job in the same workflow run, which lands in the same group, therefore replaces the earlier failure. A test that ran in several browsers (Playwright projects) counts as failed when its latest outcome in any of them is a failure. Every shard of a sharded suite counts.
:::tip Gate on one workflow run
In GitHub Actions, the reporter and agnox report upload group every job of a workflow run as <workflow name> #<run number>. Pass the same group to the gate (--group "${{ github.workflow }} #${{ github.run_number }}") to evaluate exactly the runs of the current pipeline.
:::
Checks
| Check | id | Fails or warns when |
|---|---|---|
| CI evidence present | ci_evidence | No finished CI or hosted run matches the scope, or the newest one finished longer ago than Max run age. Uses the No recent CI runs severity; the default is Review Required. A run of the same group or commit that is still in progress always warns. |
| No unquarantined failures | unquarantined_failures | Fails when any test failed outside quarantine, when a run ended in ERROR, or when a run FAILED without reporting test results. Failures of quarantined tests do not block: they are listed separately as quarantinedFailures. |
| Pass rate threshold | pass_rate | The effective pass rate is below Minimum pass rate. The effective pass rate is passed ÷ (passed + unquarantined failures); quarantined failures and skipped tests are left out. Uses the Below the minimum severity; the default is Blocked. It warns when there is no test result to compute it from. |
| Quarantine and flake debt | flake_debt | Warns when the evaluated tests include more quarantined tests than Max quarantined tests, or more than Max flaky share percent graded D or F by the Stability Score. |
| Required suites reported | required_suites | A required tool or required run name did not report in the evaluated runs. Uses the Missing a required suite severity; the default is Blocked. With no runs at all, it follows the CI evidence severity instead. |
The verdict is Blocked when any check fails, Review Required when none fails but at least one warns, and Ready otherwise.
:::warning Quarantine is not a bypass for regressions
A test is treated as quarantined when the run flagged it, or when its test case is quarantined now. A quarantine whose TTL has passed doesn't count. A quarantined test whose test case is a suspected regression (regressionSuspected or branchRegressionSuspected) still blocks and is marked regressionSuspected: true. A consistent failure is a likely product bug, not a flake.
:::
Policy
Each project has a Release Gate Policy. Projects that never changed it use the built-in defaults, so the gate works without any setup or migration.
| Setting | API field | Default |
|---|---|---|
| Max run age (hours, 1–720) | maxRunAgeHours | 24 |
| No recent CI runs | missingEvidenceSeverity | warn (Review Required) |
| Minimum pass rate (%, 0–100) | minPassRate | 100 |
| Below the minimum | passRateSeverity | fail (Blocked) |
| Max quarantined tests | maxQuarantinedTests | 5 |
| Max flaky share, grade D/F (%) | maxFlakyPercent | 10 |
| Required tools | requiredTools | none |
| Required run names | requiredRunNames | none |
| Missing a required suite | missingSuiteSeverity | fail (Blocked) |
Change the policy in Settings → Run Settings → Release Gate Policy. Admins and developers can edit it; other roles see it read-only.
- Required tools match the tool of each run, lower-cased. For a reporter run this is the framework (
playwright,jest,vitest,cypress). For a report upload it is--tool(for examplemaestroorpytest), or else the report format (junit,allure). Hosted runs count asagnox-hosted. - Required run names match the run name (
runName, or--run-name) case-insensitively. A shard of a job counts for the job:e2e 2/3(the reporter's default name for a sharded job in GitHub Actions) satisfies a requirede2e. Only runs reported after the Release Readiness Gate shipped store their name.
Dashboard
The Release readiness card sits under the KPI cards on the Executions page. It follows the page's environment and group filters and shows:
- the verdict badge (Ready, Review Required or Blocked);
- the evaluated scope, for example
env staging · latest group "E2E #42" · 3 runs; - when the verdict was evaluated;
- Show checks, which lists each check with its pass, warning or failure icon, the blocking failures, and links that open the cited runs.
CI: agnox gate check
agnox gate check ships in @agnox/mcp-server 2.3.0 and later; agnox gate check --help prints every option, its exit codes and examples (2.4.1 and later).
npx -y @agnox/mcp-server@latest gate check [--project <id>] [--branch <name>] [--commit <sha>] \
[--env <development|qa|staging|production>] [--group <name>] [--fail-on-review] [--format text|json|markdown]
| Exit code | When |
|---|---|
0 | READY, or REVIEW_REQUIRED without --fail-on-review. A note goes to stderr. |
1 | BLOCKED, or REVIEW_REQUIRED with --fail-on-review |
2 | Usage, configuration or network error, such as a missing AGNOX_API_KEY, an unknown flag, an unknown project, or Agnox not reachable |
A broken gate exits with code 2 and is never reported as BLOCKED. Only the formatted verdict is printed to stdout; messages go to stderr. That makes --format markdown safe to append to $GITHUB_STEP_SUMMARY or to post as a pull request comment. --format json prints the full API response.
GitHub Actions
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npx playwright test # @agnox/playwright-reporter groups the run as "<workflow> #<run number>"
env:
AGNOX_API_KEY: ${{ secrets.AGNOX_API_KEY }}
AGNOX_PROJECT_ID: ${{ vars.AGNOX_PROJECT_ID }}
release-gate:
needs: [e2e]
if: always()
runs-on: ubuntu-latest
steps:
- name: Release readiness gate
run: |
npx -y @agnox/mcp-server@latest gate check \
--group "${{ github.workflow }} #${{ github.run_number }}" \
--env staging \
--format markdown >> "$GITHUB_STEP_SUMMARY"
env:
AGNOX_API_KEY: ${{ secrets.AGNOX_API_KEY }}
AGNOX_PROJECT_ID: ${{ vars.AGNOX_PROJECT_ID }}
The step fails when the verdict is BLOCKED, and the job summary shows the verdict, a table of the checks, the blocking failures and links to the runs. Add --fail-on-review to also stop on REVIEW_REQUIRED.
To keep shipping when Agnox itself can't be reached, treat exit code 2 separately:
set +e
npx -y @agnox/mcp-server@latest gate check --group "$GROUP" --format markdown >> "$GITHUB_STEP_SUMMARY"
code=$?
set -e
if [ "$code" -eq 2 ]; then echo "::warning::Release gate unavailable"; exit 0; fi
exit "$code"
Public API
| Method | Path | Who |
|---|---|---|
| GET | /api/v1/projects/{projectId}/release-readiness | Any role. Query: branch, commit, environment, groupName |
| GET | /api/v1/projects/{projectId}/release-readiness/policy | Any role |
| PATCH | /api/v1/projects/{projectId}/release-readiness/policy | Admin or Developer |
Authenticate with an API key (x-api-key) or a dashboard session (Authorization: Bearer). A project of another organization answers 404.
curl -s -H "x-api-key: $AGNOX_API_KEY" \
"https://api.agnox.dev/api/v1/projects/$AGNOX_PROJECT_ID/release-readiness?environment=staging"
{
"success": true,
"data": {
"projectId": "665f…",
"verdict": "BLOCKED",
"summary": "Blocked: 1 test failed outside quarantine; Effective pass rate 97.5% (39 of 40) is below the 100% minimum.",
"evaluatedAt": "2026-12-02T10:00:00.000Z",
"scope": { "branch": null, "commit": null, "environment": "staging", "groupName": null, "resolvedBy": "group", "resolvedGroupName": "E2E #42", "resolvedCommit": null },
"policy": { "maxRunAgeHours": 24, "minPassRate": 100, "…": "…" },
"checks": [
{ "id": "unquarantined_failures", "name": "No unquarantined failures", "status": "fail", "summary": "1 test failed outside quarantine.",
"evidence": { "taskIds": ["report-1764…"], "testKeys": ["4c1f…"], "counts": { "failedTests": 1, "erroredRuns": 0, "quarantinedFailures": 0 } } }
],
"runs": [{ "taskId": "report-1764…", "tool": "maestro", "status": "FAILED", "groupName": "E2E #42", "finishedAt": "…", "url": "https://…/dashboard?drawerId=report-1764…" }],
"blockingFailures": [{ "taskId": "report-1764…", "testKey": "4c1f…", "name": "Login flow", "file": "login.yaml", "tool": "maestro", "regressionSuspected": false, "url": "…" }],
"blockingFailuresOmitted": 0,
"quarantinedFailures": [],
"quarantinedFailuresOmitted": 0,
"dashboardUrl": "https://…/dashboard"
}
}
resolvedBy tells how the runs were chosen: group, commit, latest (one run), or none (no run matched). blockingFailures and quarantinedFailures list up to 50 entries; the …Omitted counts give the rest.
Change the policy with PATCH. Send only the fields to change; null returns a field to its default:
curl -s -X PATCH -H "x-api-key: $AGNOX_API_KEY" -H "content-type: application/json" \
-d '{"requiredTools":["playwright","maestro"],"maxRunAgeHours":48,"minPassRate":null}' \
"https://api.agnox.dev/api/v1/projects/$AGNOX_PROJECT_ID/release-readiness/policy"
The response holds the effective policy, the defaults, and customized, the fields the project has set. Unknown fields and out-of-range values are refused with 400 INVALID_REQUEST. The full schemas are in the OpenAPI document.
MCP: get_release_readiness
Coding agents connected through the Agnox MCP server can call get_release_readiness before merging or releasing. It takes projectId (defaults to AGNOX_PROJECT_ID) and optional branch, commit, environment and groupName. It returns the verdict, the checks, up to 20 blocking and quarantined failures, the evaluated runs and the dashboard URL.
The first line of the result is a summary built from counts only, such as Release readiness BLOCKED: 1 failed check, 0 warnings, 1 blocking failure across 3 runs. Everything else is under untrusted_data, as with every Agnox tool. The Agnox Quality skill tells agents to report a blocking failure with its evidence. Agents must never quarantine, skip or weaken a test to turn the verdict green.
Ask your assistant, for example: "Is this branch ready to release? What's blocking it?"
Related
- GitHub Actions & CI/CD →
- JUnit XML & Allure Report Ingestion →: gate on Maestro, Pytest or any other framework's runs
- PR Test Auditor →: check the tests in a pull request before they reach the gate
- Public API v1 →
- MCP Server →