PatchFlowDocs
Concepts

Test gates

Choose GitHub Checks, an isolated local run, or a controlled fallback.

Open Markdown ↗
ModeBehaviorBest for
checksWait only for GitHub ChecksProduction repositories
localClone, set up, and test locallyFast feedback or no CI
autoPrefer checks; use local only if none appearEarly 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.

NextProduction operation