Lint rungs and gates
Rules and rungs
Section titled “Rules and rungs”Every rule a design loop states in prose and a machine can check is a lint
rule with a stable, kebab-case ID: ruling-cell-blank,
defect-closed-owing. gantry rules lists them all with their rung, kind
and default severity; gantry explain <rule-id> says what one catches, why
and how to fix it. A correctness rule is always an error; a
quality rule’s severity can be set in gantry.yaml (lint.rules).
The rules run in rungs, in order:
| Rung | Checks | Run by |
|---|---|---|
schema |
files parse, fit their schema, are formatted, and generated pages are current | lint |
refs |
every reference resolves | lint |
assertions |
ruled rulings have assertions, and the tests they name exist in the platform’s test files | lint |
owes |
closed defects owe what their class requires, and the owes exist | lint |
history |
IDs, rulings and the baseline against the base branch | lint --base <ref> |
gates |
the project’s own checks | sweep |
evidence |
every frame’s blob is there and is the one the manifest names | lint |
Nothing is silently clean
Section titled “Nothing is silently clean”A clean result that read nothing is a failure. Every run ends with a tally, by rule name, of what each rule examined and found; a rule that did not run says why:
history ruling-edited-without-amendment: examined 0, findings 0 (skipped: no --base)gates gate-failed: examined 0, findings 0 (skipped: run by gantry sweep)A clean result is believed by name, never by total. The same idea runs
through the rest: a sibling reference Gantry cannot check is counted as
sibling-unchecked, and an unpulled frame as evidence-not-pulled.
--strict fails on warnings too. --format github writes annotations,
and --json the findings with a docs link each.
A gate is one of your project’s own checks: any command, run from the
project root, that prints a JSON report. Gantry does not implement gates; it
runs them and refuses to believe one that cannot prove it looked.
gantry.yaml declares each gate and the check IDs it reports:
gates: tab-bar: run: "sh scripts/check-tab-bar.sh" checks: [five-destinations]The command prints what it scanned, what it found and a selftest, the result of feeding itself known-bad input:
{"gate": "tab-bar", "checks": [{"id": "five-destinations", "scanned": 3}], "selftest": {"flagged": 1, "ignored": 0, "ok": true}, "scanned": {"files": 3, "items": 3}, "findings": [], "exemptions": []}gantry sweep runs every gate, or those named with --gate, and fails on:
- any finding (
gate-failed), and an exemption without a reason, a timeout (300s unless the gate setstimeout), a report that is not JSON, or checks other than those declared; - a gate or check that scanned nothing, or no gates configured at all
(
gate-empty-scan); - a missing or failed selftest, or one that flagged nothing
(
gate-selftest-missing): a gate that cannot catch known-bad input cannot be trusted.
$ gantry sweepgantry.yaml: error gate-selftest-missing: gate tab-bar: selftest flagged nothing, so it proves nothing (gates.tab-bar)gates tab-bar: examined 3, findings 11 error, 0 warnings, 0 infosA defect owes a gate as gate:tab-bar#five-destinations, and an assertion
of kind gate-check names one the same way: always a declared check, never
just the gate.