Comparison
AI code review vs guardrails vs tests: who catches what
TL;DR
- Tests catch behaviour you wrote a test for. AI review catches what a careful reader would. Guardrails catch what the agent wasn't allowed to do.
- AI-written code adds failure modes none of the old layers were built for: scope creep and weakened tests.
- A free baseline: your tests + Stet on every PR. Add an AI reviewer if you want opinions on the code.
Who catches what
| Failure | Tests | AI review | Stet |
|---|---|---|---|
| Known behaviour broke | Yes, if tested | Sometimes | Yes: runs tests on PR and main |
| Failure was already on main | No (looks like yours) | No | Yes: labels it |
| Agent edited files outside the task | No | Rarely | Yes, with a scope |
| Tests deleted, skipped or assertions removed | No: they still pass | Sometimes | Yes: fixed patterns |
| Type or lint checks switched off | No | Sometimes | Yes |
| Poor design, naming, edge cases | No | Yes | No |
| Untested behaviour broke | No | Sometimes | Only with a lock or snapshot |
The cheapest setup that covers it
- Your existing tests, plus a type check (
tsc --noEmit) if you use TypeScript. - Stet on every PR: free, two clicks at getstet.dev/add. It runs those tests on the PR and on main and flags weakened tests.
- Optional: an AI reviewer (CodeRabbit, Copilot review, self-hosted PR-Agent) for opinions on the code.
- When agents write most of the code:
npx stet-cli initto lock key behaviours and set a scope per task.
FAQ
Is AI code review enough for AI-written code?
Usually not on its own. AI review doesn't run your code, so it can miss regressions and won't tell you whether a failure was already on main. Pair it with tests and a guardrail that runs them on every PR.
What are guardrails for AI coding agents?
Rules the agent can't talk past: which files a task may change, which behaviours must keep passing, and checks that tests weren't weakened. Stet enforces them before commit and on every PR.
What is the cheapest way to review AI-generated pull requests?
Your existing tests plus Stet on every PR is free. Add an AI reviewer if you also want comments on design and style.
See what your AI change really did, on every PR
Stet posts one comment on every pull request: what broke vs main, tests deleted, weakened or skipped, checks switched off, files outside the task. Free and open source, zero config, nothing leaves your CI. Plus a CLI and MCP server for Claude Code, Cursor and Codex.
Add to GitHub in 2 clicks · npx stet-cli init · Install · Setup guide · GitHub