---
key: process.local-gate-before-push
title: 2026-07-21 — Local build/test gate + cold-context review run BEFORE the push, not after (#542)
status: active
since: '2026-07-21'
supersedes: none
superseded-by: none
rule: Run the local build/test gate and a cold-context, scoped "review only" adversarial review over the diff, fold the fixes, and only then push or open the PR.
signals: 'local gate before push · cold review before CI · CI is not the first line of defence · uncancellable run · queue pressure · paths: n/a · issues: #542'
mechanics: local build/test gate + a scoped review-only agent over `origin/main...HEAD`; CI (armed on the PR head sha at PR-open) *confirms* the result.
---

Gitea runners should only ever see already-validated work. CI here is a scarce shared slow resource and
a run cannot be cancelled on this Gitea version, so spending a run to surface a lint error or a
review-catchable bug is pure waste plus queue pressure on every other in-flight session.

CI confirms; it is not the first line of defence. Treating it as the first line inverts the cost: the
cheap fast private check is skipped in favour of the expensive slow shared one.
