Concepts
Test gates
Choose GitHub Checks, an isolated local run, or a controlled fallback.
| Mode | Behavior | Best for |
|---|---|---|
| checks | Wait only for GitHub Checks | Production repositories |
| local | Clone, set up, and test locally | Fast feedback or no CI |
| auto | Prefer checks; use local only if none appear | Early adoption |
Required checks
When requiredChecks is non-empty, every named check must appear and finish with success. Missing, skipped, neutral, cancelled, or failed required checks do not pass.
patchflow.config.json
{
"testGate": "checks",
"requiredChecks": ["lint", "unit", "integration"]
}Local setup
Auto setup selects npm ci, pnpm, Yarn, Bun, or npm install from the repository lockfile. A setup failure ends the gate before tests run. Set setupCommand to none only for a self-contained test command.
patchflow.config.json
{
"setupCommand": "auto",
"testCommand": "npm test",
"testGate": "local"
}Retries
A failed gate may resume the same agent with a bounded test-output excerpt. maxRetries is capped at three. Every attempt re-reads the PR head SHA before gating again.