Skip to content

Quality gates

A change is not “done” until the gate passes locally:

Terminal window
./scripts/ci-checks.sh # cargo fmt --check, clippy -D warnings, cargo test, markdown gate, wiki-lint --strict

The pre-push hook (scripts/pre-push) runs this same gate on every git push to main — activate once per clone with ./scripts/install-hooks.sh. The hook rejects the push if any gate fails; bypass only in emergencies with --no-verify.

.forgejo/workflows/ci.yml encodes the same checks, but no Forgejo Actions runner is registered, so nothing enforces them server-side. Until a runner is active, the local gate + pre-push hook are the enforcement layer. Stated as mandatory in AGENTS.md.

A compile break (pi_binary undefined, from a half-finished rename) reached main because the gate was skipped and unenforced. The same audit found both gates were effectively red on main at the time:

  • clippy -D warnings failed on a pre-existing lint → the Rust gate would have failed for anyone who ran it.
  • the markdown gate failed on prettier-dirty docs.

Both were brought green, so the gate is now actually runnable. The lesson: a gate nobody runs (and that’s red anyway) is the root cause of drift reaching main — more than any individual naming slip.

The naming-decisions ledger + wiki-lint --strict are the semantic counterpart to ci-checks.sh: the compiler/clippy catch broken code, but not a doc that still describes the old design or a name that drifted. The wiki lint covers that gap. It is now part of the mandatory gate — a drift failure blocks the push, same as a clippy warning.