Exemptions
Sometimes merging with a failing process check is the right call. An exemption lets you do it on the record: what was accepted, why, and until when.
Why a record, not just a label
A check that can never be waived gets worked around: someone disables it, or stops trusting it. A check that can be waived with a bare label gets waived without anyone knowing why, and the waiver outlives its reason.
An exemption sits between the two. Months later, a reader can see who accepted the failure, why, and whether the date has passed.
What an exemption is
Two things on the pull request, and the gate needs both:
- The
redline-exemptlabel, which tells the gate to look for an exemption. - A
## Redline exemptionblock in the pull request description, which says why and until when. The pull request template already carries the section, empty: fill it in or delete it.
## Redline exemption
- reason: the upstream fix lands in v4 and we are pinned to v3 until the migration
- until: 2026-11-30
- scope: checklistThe rules
| Field | Rule | Why |
|---|---|---|
reason | required, at least 20 characters | “Needed for release” tells a later reader nothing they can act on. |
until | required, a YYYY-MM-DD date, at most 90 days away. Valid to the end of that day, UTC. | Longer than that is a standards change, not an exemption: raise it in the Redline source repository. |
scope | optional: checklist, adr, policy, comma separated. Omitted, it covers all three. | Name only what you are accepting. |
The gate checks the scope against every failing check, one at a time. An exemption for checklist does not also waive a failing policy. Once until has passed, the exemption no longer applies: renew it deliberately, or fix the check.
When it matters
Only at a blocking rung. At observe a failing process check never stops a merge, so there is nothing to waive.
At block-blocker or block-high, with the label applied:
| The block | The gate |
|---|---|
| valid, and its scope covers every failing process check | passes, with a warning naming the exempted checks |
| missing, invalid, expired, or not covering a failing check | fails |
A label with no valid block is refused. The gate has an input, exemption-enforcement, that relaxes this to a warning when set to warn. Its default is require, and init never changes it.
Check it before you push
Save the description to a file and name the failing check:
$ pnpm redline exempt --body-file body.md --scope checklist exempt until 2026-11-30 (checklist): the upstream fix lands in v4 and we are pinned to v3 until the migration
$ npx redlinegate exempt --body-file body.md --scope checklist exempt until 2026-11-30 (checklist): the upstream fix lands in v4 and we are pinned to v3 until the migration
$ yarn redline exempt --body-file body.md --scope checklist exempt until 2026-11-30 (checklist): the upstream fix lands in v4 and we are pinned to v3 until the migration
$ bun run redline exempt --body-file body.md --scope checklist exempt until 2026-11-30 (checklist): the upstream fix lands in v4 and we are pinned to v3 until the migration
It exits 0 when the exemption applies. Otherwise it exits 1 and says what is wrong:
$ pnpm redline exempt --body-file body.md --scope policy warn the exemption covers checklist — it does not cover "policy". Widen its scope deliberately, or fix the check.
$ npx redlinegate exempt --body-file body.md --scope policy warn the exemption covers checklist — it does not cover "policy". Widen its scope deliberately, or fix the check.
$ yarn redline exempt --body-file body.md --scope policy warn the exemption covers checklist — it does not cover "policy". Widen its scope deliberately, or fix the check.
$ bun run redline exempt --body-file body.md --scope policy warn the exemption covers checklist — it does not cover "policy". Widen its scope deliberately, or fix the check.
Learn step 08 writes one on a real pull request.
What it can never do
An exemption covers the process checks only: the checklist, the ADR requirement and the deterministic policy. It cannot waive dependency review or the secret scan. That is what makes the security floor a floor.
Other ways past a check
- The
no-adrlabel is the ADR check's own way out, for a single large pull request that decides nothing. It needs no block. See The merge gate. - Redline's sync pull requests carry the
redline-synclabel and a real exemption block, with no special case in the gate. See Distribution.
What gets measured
The telemetry collector records the parsed block (reason, until, scope) with each merged pull request. The dashboard's Gate exemptions tile and the weekly digest show the share of merged pull requests that carried redline-exempt or no-adr. A rising share means the gate asks for something people cannot reasonably give. See Telemetry & value.
Related
redline exempt: every flag.- Enforcement ladder: when a failing process check blocks.
- The merge gate: the checks an exemption can and cannot cover.