Exit codes for CI gating
0 clean, 1 findings, 2 usage or parse error, 3 service or database unavailable — wire it into any pipeline in one line.
Four exit codes, chosen so a pipeline can tell “the migration is dangerous” from “the tool could not run”. A clean check exits 0. Findings at or above the block threshold exit 1. A usage mistake or SQL that does not parse exits 2. An unreachable database or hosted service exits 3.
That split matters in CI: you can fail the build on 1, fail it loudly on 2 (someone committed a file Postgres itself would reject), and decide separately whether 3 should block a deploy or just warn.
npx bolvrk check migrations/*.sql; case $? in
0) echo clean ;;
1) echo "blocked by findings"; exit 1 ;;
2) echo "usage or parse error"; exit 1 ;;
3) echo "service unavailable"; exit ${STRICT:-0} ;;
esacThe threshold is the team’s
Which severity turns into exit 1 is the block threshold: any finding by default, warning and above, or critical only. bolvrk policy pull copies the team’s threshold into bolvrk.json so a local run blocks on exactly what CI blocks on.
The CLI is open source and needs no account: npx bolvrk check migration.sql