Quality gate configuration
The quality gate is the rule that decides whether a CI run blocks a merge. It lives on the agent, is edited in the UI (Agent → CI / CD → Quality Gate), and is reused by every CI provider.
Fields
| Field | Required | Default | Description |
|---|---|---|---|
| Minimum overall score | yes | 0.85 | The run fails when the scorecard's overall score is strictly below this value (0 to 1). |
| Blocking dimensions | no | [] | List of dimension keys (security, privacy, ...). Each must individually pass for the gate to pass. |
| Max failed criteria | no | unset | Caps the total number of failed criteria across the scorecard. Leave empty to disable. |
| Warning band | no | unset | Soft floor below the overall minimum. When the score lands in [warning_band, overall_min), the gate passes (exit 0) but the run is flagged as a warning. |
Decision flow
The backend evaluates the gate after the run has a scorecard:
- Overall score must meet the configured minimum.
- Every blocking dimension must pass.
- Failed criteria must stay below the configured cap, when a cap exists.
- The warning band can mark a run as warning without failing the CI job.
The run response exposes the decision under results.gate, including passed, is_warning, scores, and failure messages when the gate fails.
Editing the gate without touching the CI
Because the gate lives on the agent (not in the repo), you can tighten or loosen the rule without redeploying anything:
- Open the agent in Mankinds.
- CI / CD → Quality Gate.
- Adjust the values.
- Save.
The next CI run picks up the new gate automatically. Each change is recorded on the agent config version history.
API
You can also update the gate via the API:
PATCH /api/v1/agents/{agent_id}/gate
X-API-Key: mk_xxx
Content-Type: application/json
{
"gate": {
"overall_score_min": 0.85,
"dimensions_must_pass": ["security", "privacy"],
"max_failed_criteria": 2,
"warning_band_min": 0.70
}
}
The payload is merged into agent.config["gate"]; the rest of the config is left untouched.
Frequently asked questions
What dimensions can I require?
Require only dimensions that are evaluated by the agent's selected criteria. If a required dimension has no score for that agent, the gate cannot pass reliably.
Can I have different gates for different branches?
The gate is per agent. Use separate agents when different environments or branches need different rules.
Can I override the gate in a one-off CI run?
No. The CI snippet carries the agent UUID and the API key; the gate remains the source of truth on the agent.
See also
- Getting started: set up the integration end-to-end.
- GitHub Actions and GitLab CI: provider-specific guides.