CI gate
The CI gate turns documentation accuracy into a merge requirement. When enabled, ZAR checks a pull request’s docs and, if they look stale, blocks the merge the same way a failing test would. It’s off by default. Turn it on only when you trust ZAR’s suggestions on a repo — and consider previewing in dry-run first.Enable it
Either from a PR comment:ci_gate_enabled). Disable the same way:
What it does on a PR
When the gate is enabled and a PR is updated (synchronize / ready_for_review), ZAR evaluates whether the docs are still accurate. If they’re not, ZAR:
- comments on the PR with the proposed documentation edits,
- adds two labels:
docs-neededandci-blocked, - creates a failing check run named
docagent/ci-gatewith the title “ZAR CI Gate: docs needed”.
How the decision is made
ZAR computes a doc freshness score for the PR and compares it to therequired_doc_freshness threshold:
- If ZAR proposes no doc changes, freshness is high and the gate passes.
- If ZAR proposes any doc change, freshness drops below the (high, ~0.9) threshold and the gate blocks.
required_doc_freshness in the dashboard if you want a looser gate.
It fails safe
If ZAR can’t confidently parse the model’s assessment, it blocks rather than letting the PR through. A spurious “docs needed” is easy to clear; a silently merged stale-docs PR is exactly what the gate exists to stop.Dry-run never blocks
If the repo is in dry-run, the gate still evaluates and can comment, but it never fails the check or blocks the merge. Use this to see how often the gate would fire before you let it block real merges.Make it required (optional)
The gate creates a standard GitHub check run (docagent/ci-gate). To enforce it, add it to your branch protection rules: Settings → Branches → Branch protection → Require status checks to pass. Now a stale-docs PR can’t be merged until ZAR is satisfied or the gate is cleared.
Clearing a block
To unblock a PR that the gate has flagged:- Merge ZAR’s proposed docs edit (from the comment or the docs PR), or update the docs yourself, then
- push to the PR so ZAR re-evaluates. When freshness clears the threshold, ZAR removes the labels and the check turns green.
@docagent disable ci-gate) or adjust the threshold.
Reference
| Thing ZAR creates | Name |
|---|---|
| Commit status context | zar/docs |
| Check run | docagent/ci-gate |
| Labels | docs-needed, ci-blocked |
Next steps
- Trigger modes — and dry-run for safe previews.
- PR feedback — the comment and status the gate builds on.
- Settings reference —
ci_gate_enabled,required_doc_freshness.