Testing with Agents in a Minute · beginner

Testing in a Minute: Verification gates

A verification gate is a deterministic check that must pass before agent work is accepted.

Last verified: 2026-09-06

In one sentence

A verification gate is an external check—usually automated—that decides whether agent work is acceptable.

Why it matters

Without gates, “done” means the model feels finished. With gates, “done” means the repository meets a measurable bar.

How it works

Common gates:

  • unit/integration tests;
  • typechecker / linter;
  • build;
  • smoke HTTP checks;
  • policy checks (forbidden paths, secret scanning).

Put the gate command in the task spec and in CI. The agent should run the same gate locally when practical.

Example

Gate: npm test && npm run lint && npm run build
Merge only if all three are green.

Agentic coding use

Gates turn agent output into engineering artifacts. They also create a feedback signal the agent can use in a verification loop.

Watch out

A gate that is flaky trains agents (and humans) to ignore it. Fix flaky checks before you scale agent volume.