Release gates
Turn stored evidence into a hard allow or deny decision in CI.
Release Rules
Release Rules turn PreFlight evidence into a hard release control. Instead of hoping someone ran checks before promoting, CI or Vercel asks PreFlight one question — is this project safe to deploy right now? — and blocks the release when the answer is no.
How it works
Your CI job or Vercel deploy hook calls the gate endpoint. PreFlight evaluates current evidence and returns:
- HTTP 200 with
allowed: truewhen the release is safe. - HTTP 409 with
allowed: falseand a blocker list when it is not.
?mode=strict or ?mode=relaxed.
curl -sS -H "Authorization: Bearer pf_live_..." \
"https://getpreflight.dev/api/v1/projects/<project-id>/deploy-gate?mode=strict"
Example blocked response:
{
"allowed": false,
"mode": "strict",
"project_name": "vibecoder-saas",
"blockers": [
{
"key": "checks_not_clean",
"severity": "failed",
"source": "checks",
"message": "2 failed, 1 warnings.",
"dashboard_url": "https://getpreflight.dev/dashboard/projects/.../checks"
}
],
"warnings": [],
"summary": "1 blocker."
}
Fail your CI job on HTTP 409. Each blocker includes a dashboard_url linking straight to the failing surface.
Strict vs relaxed mode
Set the default mode in the gate policy on /dashboard/deploy-gates. Override per request with ?mode=strict or ?mode=relaxed.
In strict mode, allowed requires zero blockers and zero warnings. In relaxed mode, warnings do not prevent allowed: true.
Default policy
When no custom policy exists, PreFlight applies these defaults:
What a gate can require
Each requirement maps to a blocker source. The policy controls whether that source blocks, warns, or is ignored.
Tuning the policy
Real pipelines need escape hatches that do not gut the gate:
Wiring into CI
pf_live_… value is shown once.
GET /deploy-gate and fail the job on HTTP 409.
strict for production and relaxed for preview branches.
dashboard_url, source, and message for fast triage.
GitHub Actions example
- name: PreFlight release rule
run: |
code=$(curl -sS -o gate.json -w "%{http_code}" \
-H "Authorization: Bearer ${{ secrets.PREFLIGHT_API_KEY }}" \
"https://getpreflight.dev/api/v1/projects/${{ vars.PREFLIGHT_PROJECT_ID }}/deploy-gate?mode=strict")
cat gate.json
if [ "$code" != "200" ]; then
echo "release rule blocked the release."
exit 1
fi
Vercel integration
Add the gate call as a step before vercel deploy --prod, or use a GitHub Action that runs on deployment_status. Pair with Vercel Watch so deployment drift is caught between gate checks.
POST /projects/:id/checks and an Idempotency-Key before calling the gate when your pipeline just deployed. The gate reads stored rows — it does not run probes itself.
<RelatedLinks links={[ { href: "/docs/api/authentication", title: "API authentication", description: "Create and send bearer keys." }, { href: "/docs/guides/monitoring-and-sentinel", title: "Uptime Monitoring", description: "The always-on signal a gate can require." }, { href: "/docs/guides/revenue-watch", title: "Payment Sync", description: "Stripe-to-Supabase reconciliation for gate blockers." }, { href: "/docs/api/status-and-incidents", title: "Status and incidents API", description: "Read-only health alongside the gate endpoint." }, ]} />
