Troubleshooting

What each failure means, and the command that resolves it. Ordered by how often it happens, because you are here with a symptom, not a component.

Every heading below is a real message from redline, the gate, or GitHub. Each entry says what causes it, the command that fixes it, and how to confirm the fix. If you have a string, search it: ⌘K indexes every page and every rule id.

Start here: one command answers most of it

redline verify reads back what the host actually reports, not what a config file claims, and names every check that is wrong. Run it before reading further. Each line starts with one of these:

terminal
$ pnpm redline verify
It printsMeansExit
okchecked, and correct.0
FAILchecked, and wrong. This is drift, and it is work.1
??could not be checked — no credential, no permission, or the host did not answer. Never read this as a pass.1
FAIL onboarded no …/.redline.json, aloneNothing has been installed here. The line ends with the init command to run.2

FAIL is work for you or an admin. ?? means run it again with a token that can see the setting.

The pull request says “Expected — waiting for status”, forever

The most common failure, and the most misleading: the branch rule requires a check name that nothing will ever report, so the pull request waits for a status that does not exist. It is not a slow gate. It will never resolve.

On GitHub the required context is built from two job ids — the caller job and the called job — so it is exactly redline-gate / gate, with the spaces. Rename either job and every pull request in the repository hangs.

HostThe required name must be
GitHubredline-gate / gate
Azure DevOpsredline/gate (genre redline, name gate)

Find it. redline verify compares the required name with what GitHub reported on a real pull request, on its check-name-reported line. Or ask GitHub which check the default branch requires:

terminal
$ gh api 'repos/{owner}/{repo}/rules/branches/main' --jq '.[] | select(.type=="required_status_checks") | .parameters.required_status_checks'

[{"context":"redline-gate / gate"}]

Fix it. If you renamed the caller job (redline-gate in .github/workflows/redline.yml) or the gate's gate job, put the name back, or re-run pnpm redline init --repair to rewrite both files. If you are adding your own job, see Adding a check of your own.

Confirm. Push to the pull request. A check named redline-gate / gate appears in gh pr checks, and check-name-reported in verify reads ok.

The gate is green, and I do not believe it

You are right to check. Two things produce a false green:

  • A job that is not in the aggregate's needs:. It runs, it can go red, and the gate job never reads it — so it blocks nothing while looking like it does.
  • A rung that is not what you think. At observe the process checks report and never block. That is the default for a fresh repository and it is deliberate — see the enforcement ladder.

Do not reason about it — prove it: watch the gate pass, block, and refuse to be waived.

partially onboarded, or a capability that says denied

This is the normal path, not a failure: a run without admin rights still lands everything file-level and records what it was refused. An administrator clears it with pnpm redline init --repair — After the pull request merges has the details. It is not rm .redline.json: your recorded menu, rung and onboarding date survive it.

Confirm. In the --repair report, every setting reads applied or already, and pnpm redline verify prints ok on pending-admin.

If your gate is vendored (--gate-source local), every init run, --repair included, rewrites .github/workflows/redline-gate.yml from the shipped copy. Anything you added to that file by hand is gone. Put your own checks in their own workflow — option 1.

I applied redline-exempt and the gate still blocked

The gate's log says which of three causes it is:

  • A soft-fail label was applied without a valid `## Redline exemption` block (reason and expiry required). The label on its own does nothing. The pull request description needs a ## Redline exemption block with a reason of at least 20 characters and an until date no more than 90 days out. See Exemptions.
  • The same error, with a block present: the block does not cover the failing check. Its scope must name every process check that is failing, or be left out to cover them all.
  • Redline gate failed on security checks (not label-exemptible, and not on the enforcement ladder): … Dependency review or the secret scan failed. They are the security floor, and no label or exemption waives them at any rung. Fix the dependency or remove the secret.

Find which. Run the check the gate runs, on your machine, once per failing check (checklist, adr, policy). It prints what is wrong with the block:

terminal
$ gh pr view --json body --jq .body > body.md
$ pnpm redline exempt --body-file body.md --scope checklist

Confirm. The command prints exempt until <date> (<scope>): <reason> and exits 0. Edit the description, and the gate runs again.

An exemption downgrades the process checks — checklist, ADR, policy — for a reviewer who accepts the trade-off on the record. It does not delete the finding; it records who accepted it, why, and until when.

The checklist check fails and the boxes look ticked

The PR checklist job fails with one of two errors:

  • No '## Launch readiness' section in the PR description. Restore .github/pull_request_template.md and complete the checklist. The job finds the checklist by its heading, and the heading is gone or reworded. The boxes can all be ticked and it still fails. Paste the ## Launch readiness section back from .github/pull_request_template.md.
  • N unchecked launch-readiness item(s). Tick each one, or delete the line and say why in the PR description. A box under the heading is still [ ]. Tick it, or delete the line and explain why in the description.

Confirm. Editing the description re-runs the job, and its log ends with Launch readiness complete.

A rule is installed and never fires

Check the rule's own page first — /r/<rule-id>, or redline explain <rule-id> — for what it applies to:

  • The globs. A rule scoped to **/*.ts will not fire in a .vue file, whatever the profile says.
  • Added lines only. The deterministic tier judges what the change added. A pre-existing violation the diff merely moves past is not a finding — that is the noise rule, not a bug.
  • A ticket reference silences some rules by design. core/untracked-todo and core/type-checker-suppression both pass when the line carries one.

If the rule genuinely cannot fire in your language — the checker knows no pattern your stack writes — that is a defect in Redline, not in your repository, and it is worth reporting. It has happened: the changelog has the case where a BLOCKER shipped to four languages it could not fire in.

Set where your organisation publishes the standard, and every finding carries the address of the rule it cites:

terminal
$ pnpm redline init --docs-url https://your-docs.example.com

It is recorded in .redline.json as docsBaseUrl and is empty by default. There is no default on purpose: a link to somebody else's copy of the standard is worse than no link, and an organisation running Redline internally wants findings pointing at its own.

Verify says the artifacts are stale and I did not touch them

The rendered files are compared with what the CLI running verify would render. Which of these lines artifacts-current prints tells you what moved:

  • standards updated upstream (vA → vB) — re-run redline init to adopt — the CLI running the check is newer than the one that rendered this repository, so it carries a newer standard. Re-running init with the copy pinned in package.json changes nothing: it renders the version this repository already has. Bump the pin, then re-run init and merge the pull request — the walk-through is in Learn 10.
  • this CLI renders standards vA, older than the vB this repository recorded — your copy of the CLI is behind the repository. Install the version in package.json rather than re-running init, which would render the repository backwards.
  • this repository's own .redline/local.md has changed since the last render — re-run pnpm redline init to fold it in.
  • stale: … — the same version renders differently, so somebody edited inside a REDLINE block. pnpm redline init restores it; your own content outside the markers is never touched.

On a repository in the register, the platform team does the first case for you: redline sync, run from a checkout of the Redline source repository, opens the update pull request — see Distribution & drift. It only reaches repositories listed in registry.json; any other repository updates itself.

I want it off this repository

Close the onboarding pull request if it has not merged — nothing was changed. If it has, Removing Redline lists every file and host setting redline init created and how to take each one back out. Read the part about the security floor before you start: secret scanning and push protection are host settings that were probably worth having anyway.

redline failed unexpectedly

That line means a defect in Redline, not a mistake in how it was run — a usage mistake exits 2 and names the flag, and a mistyped flag or command says which one you probably meant. Re-run the same command with REDLINE_DEBUG=1 set and the stack trace is printed to stderr. Include it when you open an issue. The exit code stays 4.

Still stuck

redline status prints what this repository recorded, and redline verify --json gives the same checks in a form you can paste. Both are safe to share — neither includes a credential. Open an issue with the output rather than a description of it.