← All skills

Gates that can actually fail

Three exit codes, five fake-green mechanisms, and a demo gate that refuses to report green when it cannot see its input.

REPO gengyue-ai/verification-gate-integrityLICENSE MITWHAT WE VERIFIED Reproduced · 2026-11-18
The problem

A gate that cannot go red turns "all green" into decoration, and nothing tells you it stopped working.

A gate’s whole value is that it goes red when it should. A gate that cannot fail is worse than none: “all green” becomes decoration, and nothing signals that it stopped working.

Three exit codes, not two

scanned 1 file(s), 0 violation(s)      EXIT=0
scanned 1 file(s), 1 violation(s)      EXIT=1
GATE ERROR: no .html files found …     EXIT=2

The third one is the whole point. When the gate cannot see its input — empty directory, broken glob, missing tool — it must not report success. 0 violations of 0 files is the most common fake green there is, and it looks exactly like a healthy run.

The five ways gates go fake-green

  1. Exit code through a pipe — gate.sh | tail -3; echo $? gives you tail’s status. Capture to a file; use set -o pipefail.
  2. The credential was masked into a literal — Bearer *** in place of a variable means every request is the same request, and the exit code never moves.
  3. The scan is narrower than the claim — git grep -- 'src/*' skips subdirectories. Scan the whole tree the day you add the gate.
  4. Green by changing the subject — silencing red with a rename or a wider rule. Ask whether the change makes the product work; if not, record it as a gap instead of shipping it.
  5. The display layer drops rows — ten rows joined into one line, rendered as one item, with no assertion because “it’s just a report”.

Trust only what you have seen fail

Break the thing on purpose, watch the gate go red, paste that output somewhere, then restore. This repo’s two origin stories are exactly that: a layout gate catching a shape faked with box-shadow, and a post-build assertion catching a control rendered twice — both added and proven red before being trusted.

What we verified

examples/gate.sh executed on three inputs (clean / one violation / empty directory); exit codes 0, 1 and 2 in the README are pasted from that run.

Install

Copy SKILL.md into skills/<category>/verification-gate-integrity/, then run examples/gate.sh against the fixtures to see all three exit codes.

Repository ↗

Sources