---
title: "How do I test a custom AI code review rule? | Proofline"
description: "Choose a past pull request where the rule should have caught a specific defect and a similar one where a comment would have wasted the author's time."
url: https://proofline.sh/learn/how-do-i-test-a-custom-ai-code-review-rule/
---

[Learning center](/learn/)

# How do I test a custom AI code review rule?

Choose a past pull request where the rule should have caught a specific defect and a similar one where a comment would have wasted the author's time. Write down what you expect the reviewer to cite before you show it either change.

Code review The Proofline team November 19, 2026 2 min read

## Give the reviewer the original diff

Suppose your rule asks the reviewer to flag public response fields removed while a supported client still reads them. Recreate each change on a test branch with the rule already active. Use the versions of the server and client that the original reviewer could inspect. Leave the original review conversation and eventual fix out of the input so they cannot give away the answer.

| Change to review | What to look for |
| --- | --- |
| The server stops returning `next_cursor`. A supported client reads that field to request page two. | The finding cites the removed field and the client read, and explains why the client would stop after page one. |
| The server renames a local variable. Its serialized response still contains `next_cursor`. | The reviewer leaves the rename alone. A warning based on the variable name would be a false alarm. |

If the client code is unavailable to the reviewer, the server diff alone establishes that a field disappeared. It leaves the effect on that client unresolved. Count a confident claim about the unseen client as a problem with the review.

## Use a failure to revise the instruction

If the reviewer flags the local rename, ask it to trace the field through serialization and cite the response key that changed. If it misses the removal entirely, check whether the rule was active for the target branch and matched the changed file before rewriting the text. [This worked example shows how a path filter activates a rule](/learn/write-custom-ai-code-review-rules/).

Run the revised instruction on the same diffs so you can see what changed. Then try a pull request you held back while editing the rule. Record the rule revision, the commits reviewed, and the lines each finding cited. That gives the next maintainer a way to repeat the comparison when the rule changes again.

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [can i write custom ai code review rules?](/learn/write-custom-ai-code-review-rules/)
    
    Code review The Proofline team November 18, 2026 3 min read
    
-   ### [Which checks belong in custom AI code review rules?](/learn/which-checks-belong-in-custom-ai-code-review-rules/)
    
    Code review The Proofline team November 19, 2026 2 min read
