AID-18Recommended
Look for weakened checks and skipped work
Reject any change that deletes or skips tests, loosens a linter or type setting, or catches and hides errors to make the checks pass.
How to do it
Search the diff for removed tests and for skip and ignore markers. In JavaScript look for .skip, .only, xit, @ts-ignore and eslint-disable. In Python look for pytest.mark.skip, # type: ignore and # noqa. Other examples are @Disabled in Java and t.Skip( in Go. Look for empty catch and except blocks too. Ask why each one is there. Most come from an agent that could not fix the problem. Agent-written tests often assert what the code does, not what it should do, so check that every test can fail. Protect the check files themselves with code owner review.
Examples
Shell example
git diff origin/main...HEAD -- . ':!*.lock' \
| grep -nE '^\+.*(\.skip\(|\.only\(|xit\(|@ts-ignore|@ts-expect-error|eslint-disable|mark\.skip|type: ignore|noqa|@Disabled|t\.Skip\()' \
&& exit 1 || exit 0
How to check
A script fails the pull request when the diff adds a skip marker or an ignore comment, unless a reviewer approves the exception. A deleted test or a changed linter or type setting needs code owner approval.
Sources
Related rules
- AID-70 Tell the agent to stop and report when it is blocked in AI-assisted development
- TST-33 Make every test able to fail in Testing
- AID-14 Protect the checks themselves in AI-assisted development
- ARC-94 Record a shortcut when you take it in Clean code and architecture
- TST-34 Review tests like code in Testing
- TST-64 Make sure tests an agent wrote do not just repeat the code in Testing
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/ai-assisted-development/reviewing-agent-output/no-weakened-checks">Agent Wranglers AI-assisted development playbook</a>. In code you write, add a comment next to it with the same link.