Skip to content

[pr-review] Don't have the Tests reviewer ask whether a PR needs tests - #203491

Closed
bbayeste wants to merge 7 commits into
gh/bbayeste/9/basefrom
gh/bbayeste/9/head
Closed

bbayeste wants to merge 7 commits into
gh/bbayeste/9/basefrom
gh/bbayeste/9/head

Conversation

@bbayeste

@bbayeste bbayeste commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Linked issue or supporting maintainer

Follow-up to #202615 and #202952.

BC-breaking?

No.

Summary (human written only)

Sync with PR #202615 on removing tests review from review agent

Agent details (if applicable)

#202615 removed the pr-review skill's guidance on whether a PR needs tests and kept the guidance on how tests are written. #202952, which landed three days later, briefed the fan-out Tests reviewer with "missing coverage", so the skill now asks for the judgement #202615 removed.

The Tests brief now covers only how the PR's tests are written (tests that cannot fail or do not check what they claim, flakiness, and the checklist's Testing items) and says that whether the PR needs more tests is not a finding, unless the checklist or an applicable REVIEW.md requires the test (for example the adversarial test for a weights_only allowlist change in torch/REVIEW.md, or gradcheck for custom backward logic), so those requirements still stand. A test the PR deletes without explaining why is still a finding: asking to restore it is not asking for more tests. The explicit sentence is there because the agent raises missing coverage without being asked: in a sample of one production review per PR (1,331 PRs, Oct 2 to Nov 4), findings about missing coverage were 9% of all findings before #202615, 13% between #202615 and #202952, and 13% after #202952. Per review, the share with at least one blocking missing-test finding was 24% before #202615, 26% between #202615 and #202952, and 36% after #202952: removing the guidance did not change the behavior. This change removes the contradiction; whether it lowers that share is for the production numbers to show.

Evaluation: 10 PRs from ciforge's recall_full dataset, the ones where the fan-out review most often asked for tests, each reviewed once with main (47ffd6f) and once with this change, locally with production's prompts and model. A model labelled each finding as asking for tests the PR lacks, about how the PR's tests are written, or other.

main This change
Findings asking for tests the PR lacks 8 0
Findings about how the PR's tests are written 27 39
All findings 152 163
Blocking findings 46 50
Reviews requesting changes 10 of 10 10 of 10

The Tests reviewer stops asking for missing tests and spends that attention on the tests the PR has. Blocking findings and verdicts do not drop; the difference is within run-to-run noise. One run per PR: a signal, not a measurement. These runs used the brief before the checklist and REVIEW.md exception was added; of the 8 missing-test findings, one partly asks for a test the checklist requires (gradcheck for custom backward logic) and one is about tests the PR deleted; both would still be raised under the final wording.

Test plan:

python3 -m unittest discover -s scripts/pr_review -t .
# local replays, once per arm (--main 47ffd6f53c8 for main):
python3 run_local_eval.py --dataset recall_full --only <the 10 cases> --main <this commit> --out <dir>

This PR was authored with the help of an AI assistant (Claude).

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

PR Status: Approved 🚀

Please fix all CI failures and trigger merge by commenting "@pytorchbot merge".

✅ AUTOMATED REVIEW - Ready for human review:

The PR rewrites the fan-out Tests reviewer's brief in SKILL.md so it covers only
how the PR's tests are written, says a missing test is not a finding unless the
checklist or a REVIEW.md requires it, and flags tests deleted without a reason,
which fixes the earlier blocking finding. Recommendation: Approve. The three
remaining points are all non-blocking.

Findings (3):

[minor] .agents/skills/pr-review/SKILL.md:190
Non-blocking: the new deletion sentence is narrower than the rule it replaces,
and it can also misfire. (1) Weakening isn't covered: loosening atol/rtol,
narrowing a @​ dtypes/@​ parametrize list, or dropping a dtype from an OpInfo
entry. "Missing coverage" on main did cover these. OpInfo lives in
common_methods_invocations.py, outside test/, so test/REVIEW.md Rule 6 never
applies to it. (2) Any reason silences the rule. "Without explaining why"
doesn't require the reason to be true or say where it must appear. Rule 6 says
"documented in the PR description", and torch/REVIEW.md:20 says the author's
claim alone is not enough. (3) Tests that are moved or merged (into OpInfo, @​
dtypes or @​ parametrize, device-generic files, or classes per test/REVIEW.md
Rule 1) show up in the diff as deletions, so a literal reading flags refactors
the checklist asked for. Suggested wording: "A test, or test coverage, the PR
removes or weakens (other than by moving or merging it) without a reason in the
PR description that holds up at HEAD is a finding."

[minor] .agents/skills/pr-review/SKILL.md:190
Non-blocking, carried over: these rules bind only the Tests sub-agent, and that
now includes the new deletion sentence. Nothing tells the lead to apply the "not
a finding" rule or the deletion rule. That holds in its own pass (:185, :196),
on the no-fan-out path (:198), in the convergence window (:226), and when it
merges and checks findings (:214, :220). On those paths the lead falls back to
the checklist, whose Testing section (review-checklist.md:184-213) has no item
about deleted tests. test/REVIEW.md Scenario 2 Case 1 also turns off Rule 6 for
allowlisted files. A deleted-test finding isn't "only in how the tests are
written" (precedence rule 6, :283), so it lands under Code Quality (rule 8,
:285). Fix: add a Test Quality item next to review-checklist.md:212, or state
the rules in Step 4 or in the Output Format's Testing section (:251).

[minor] .agents/skills/pr-review/SKILL.md:190
Non-blocking, carried over: it is unclear which checklist items the exception
covers. The same sentence limits the brief to "the checklist's Testing items"
and then makes an exception for "the checklist" as a whole. The test
requirements the PR body means (gradcheck, review-checklist.md:98) sit under
PyTorch Infrastructure, not Testing. So does the torch.compile/opcheck item
(:130), which, read as a test requirement, covers nearly every op change. The
Conventions reviewer gets the Infrastructure items (SKILL.md:192) and isn't
bound by the "not a finding" rule, so missing-test findings can come back
through that reviewer. Fix: name the requirements the exception keeps, e.g.
"unless a checklist item (gradcheck, opcheck) or an applicable REVIEW.md
requires the test".

Reviewed commit: 84189e7

Review run

🐛 Report a bad review

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/203491

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 84189e7 with merge base 2501aef (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label Nov 5, 2026
@bbayeste
bbayeste marked this pull request as ready for review November 5, 2026 01:29
@pytorchbot pytorchbot added the in progress PR is being worked on by the author, until the automated review accepts it label Nov 5, 2026
github-actions[bot]

This comment was marked as outdated.

[ghstack-poisoned]
bbayeste added a commit that referenced this pull request Nov 5, 2026
## Linked issue or supporting maintainer

Follow-up to #202615 and #202952.

## BC-breaking?

No.

## Summary (human written only)

Sync with PR #202615 on removing tests review from review agent

## Agent details (if applicable)

#202615 removed the pr-review skill's guidance on whether a PR needs tests and kept the guidance on how tests are written. #202952, which landed three days later, briefed the fan-out Tests reviewer with "missing coverage", so the skill now asks for the judgement #202615 removed.

The Tests brief now covers only how the PR's tests are written (tests that cannot fail or do not check what they claim, flakiness, and the checklist's Testing items) and says that whether the PR needs more tests is not a finding, unless the checklist or an applicable `REVIEW.md` requires the test (for example the adversarial test for a `weights_only` allowlist change in torch/REVIEW.md, or `gradcheck` for custom backward logic), so those requirements still stand. The explicit sentence is there because the agent raises missing coverage without being asked: in a sample of one production review per PR (1,331 PRs, Oct 2 to Nov 4), findings about missing coverage were 9% of all findings before #202615, 13% between #202615 and #202952, and 13% after #202952. This change removes the contradiction; whether it lowers that share is for the production numbers to show.

Evaluation: 10 PRs from ciforge's `recall_full` dataset, the ones where the fan-out review most often asked for tests, each reviewed once with main (47ffd6f) and once with this change, locally with production's prompts and model. A model labelled each finding as asking for tests the PR lacks, about how the PR's tests are written, or other.

| | main | This change |
|---|---|---|
| Findings asking for tests the PR lacks | 8 | 0 |
| Findings about how the PR's tests are written | 27 | 39 |
| All findings | 152 | 163 |
| Blocking findings | 46 | 50 |
| Reviews requesting changes | 10 of 10 | 10 of 10 |

The Tests reviewer stops asking for missing tests and spends that attention on the tests the PR has. Blocking findings and verdicts do not drop; the difference is within run-to-run noise. One run per PR: a signal, not a measurement. These runs used the brief before the checklist and `REVIEW.md` exception was added; of the 8 missing-test findings, one partly asks for a test the checklist requires (`gradcheck` for custom backward logic), and that part would still be raised under the exception.

Test plan:

```
python3 -m unittest discover -s scripts/pr_review -t .
# local replays, once per arm (--main 47ffd6f for main):
python3 run_local_eval.py --dataset recall_full --only <the 10 cases> --main <this commit> --out <dir>
```

This PR was authored with the help of an AI assistant (Claude).

ghstack-source-id: d8fdcf1
Pull-Request: #203491
github-actions[bot]

This comment was marked as outdated.

[ghstack-poisoned]
bbayeste added a commit that referenced this pull request Nov 5, 2026
## Linked issue or supporting maintainer

Follow-up to #202615 and #202952.

## BC-breaking?

No.

## Summary (human written only)

Sync with PR #202615 on removing tests review from review agent

## Agent details (if applicable)

#202615 removed the pr-review skill's guidance on whether a PR needs tests and kept the guidance on how tests are written. #202952, which landed three days later, briefed the fan-out Tests reviewer with "missing coverage", so the skill now asks for the judgement #202615 removed.

The Tests brief now covers only how the PR's tests are written (tests that cannot fail or do not check what they claim, flakiness, and the checklist's Testing items) and says that whether the PR needs more tests is not a finding, unless the checklist or an applicable `REVIEW.md` requires the test (for example the adversarial test for a `weights_only` allowlist change in torch/REVIEW.md, or `gradcheck` for custom backward logic), so those requirements still stand. The explicit sentence is there because the agent raises missing coverage without being asked: in a sample of one production review per PR (1,331 PRs, Oct 2 to Nov 4), findings about missing coverage were 9% of all findings before #202615, 13% between #202615 and #202952, and 13% after #202952. This change removes the contradiction; whether it lowers that share is for the production numbers to show.

Evaluation: 10 PRs from ciforge's `recall_full` dataset, the ones where the fan-out review most often asked for tests, each reviewed once with main (47ffd6f) and once with this change, locally with production's prompts and model. A model labelled each finding as asking for tests the PR lacks, about how the PR's tests are written, or other.

| | main | This change |
|---|---|---|
| Findings asking for tests the PR lacks | 8 | 0 |
| Findings about how the PR's tests are written | 27 | 39 |
| All findings | 152 | 163 |
| Blocking findings | 46 | 50 |
| Reviews requesting changes | 10 of 10 | 10 of 10 |

The Tests reviewer stops asking for missing tests and spends that attention on the tests the PR has. Blocking findings and verdicts do not drop; the difference is within run-to-run noise. One run per PR: a signal, not a measurement. These runs used the brief before the checklist and `REVIEW.md` exception was added; of the 8 missing-test findings, one partly asks for a test the checklist requires (`gradcheck` for custom backward logic), and that part would still be raised under the exception.

Test plan:

```
python3 -m unittest discover -s scripts/pr_review -t .
# local replays, once per arm (--main 47ffd6f for main):
python3 run_local_eval.py --dataset recall_full --only <the 10 cases> --main <this commit> --out <dir>
```

This PR was authored with the help of an AI assistant (Claude).

ghstack-source-id: 8210062
Pull-Request: #203491
github-actions[bot]

This comment was marked as outdated.

[ghstack-poisoned]
bbayeste added a commit that referenced this pull request Nov 5, 2026
## Linked issue or supporting maintainer

Follow-up to #202615 and #202952.

## BC-breaking?

No.

## Summary (human written only)

Sync with PR #202615 on removing tests review from review agent

## Agent details (if applicable)

#202615 removed the pr-review skill's guidance on whether a PR needs tests and kept the guidance on how tests are written. #202952, which landed three days later, briefed the fan-out Tests reviewer with "missing coverage", which asks for the judgement #202615 removed. This drops "missing coverage" from that brief, so the brief matches #202615 again; the rest of the brief is unchanged.

Test plan:

```
python3 -m unittest discover -s scripts/pr_review -t .
```

This PR was authored with the help of an AI assistant (Claude).

ghstack-source-id: 57eabaa
Pull-Request: #203491
github-actions[bot]

This comment was marked as outdated.

[ghstack-poisoned]
bbayeste added a commit that referenced this pull request Nov 5, 2026
## Linked issue or supporting maintainer

Follow-up to #202615 and #202952.

## BC-breaking?

No.

## Summary (human written only)

Sync with PR #202615 on removing tests review from review agent

## Agent details (if applicable)

#202615 removed the pr-review skill's guidance on whether a PR needs tests and kept the guidance on how tests are written. #202952, which landed three days later, briefed the fan-out Tests reviewer with "missing coverage", so the skill now asks for the judgement #202615 removed.

The Tests brief now covers only how the PR's tests are written (tests that cannot fail or do not check what they claim, flakiness, and the checklist's Testing items) and says that whether the PR needs more tests is not a finding, unless the checklist or an applicable `REVIEW.md` requires the test (for example the adversarial test for a `weights_only` allowlist change in torch/REVIEW.md, or `gradcheck` for custom backward logic), so those requirements still stand. The explicit sentence is there because the agent raises missing coverage without being asked: in a sample of one production review per PR (1,331 PRs, Oct 2 to Nov 4), findings about missing coverage were 9% of all findings before #202615, 13% between #202615 and #202952, and 13% after #202952. Per review, the share with at least one blocking missing-test finding was 24% before #202615, 26% between #202615 and #202952, and 36% after #202952: removing the guidance did not change the behavior. This change removes the contradiction; whether it lowers that share is for the production numbers to show.

Evaluation: 10 PRs from ciforge's `recall_full` dataset, the ones where the fan-out review most often asked for tests, each reviewed once with main (47ffd6f) and once with this change, locally with production's prompts and model. A model labelled each finding as asking for tests the PR lacks, about how the PR's tests are written, or other.

| | main | This change |
|---|---|---|
| Findings asking for tests the PR lacks | 8 | 0 |
| Findings about how the PR's tests are written | 27 | 39 |
| All findings | 152 | 163 |
| Blocking findings | 46 | 50 |
| Reviews requesting changes | 10 of 10 | 10 of 10 |

The Tests reviewer stops asking for missing tests and spends that attention on the tests the PR has. Blocking findings and verdicts do not drop; the difference is within run-to-run noise. One run per PR: a signal, not a measurement. These runs used the brief before the checklist and `REVIEW.md` exception was added; of the 8 missing-test findings, one partly asks for a test the checklist requires (`gradcheck` for custom backward logic), and that part would still be raised under the exception.

Test plan:

```
python3 -m unittest discover -s scripts/pr_review -t .
# local replays, once per arm (--main 47ffd6f for main):
python3 run_local_eval.py --dataset recall_full --only <the 10 cases> --main <this commit> --out <dir>
```

This PR was authored with the help of an AI assistant (Claude).

ghstack-source-id: 8210062
Pull-Request: #203491
github-actions[bot]

This comment was marked as outdated.

[ghstack-poisoned]
bbayeste added a commit that referenced this pull request Nov 5, 2026
## Linked issue or supporting maintainer

Follow-up to #202615 and #202952.

## BC-breaking?

No.

## Summary (human written only)

Sync with PR #202615 on removing tests review from review agent

## Agent details (if applicable)

#202615 removed the pr-review skill's guidance on whether a PR needs tests and kept the guidance on how tests are written. #202952, which landed three days later, briefed the fan-out Tests reviewer with "missing coverage", so the skill now asks for the judgement #202615 removed.

The Tests brief now covers only how the PR's tests are written (tests that cannot fail or do not check what they claim, flakiness, and the checklist's Testing items) and says that whether the PR needs more tests is not a finding, unless the checklist or an applicable `REVIEW.md` requires the test (for example the adversarial test for a `weights_only` allowlist change in torch/REVIEW.md, or `gradcheck` for custom backward logic), so those requirements still stand. A test the PR deletes without explaining why is still a finding: asking to restore it is not asking for more tests. The explicit sentence is there because the agent raises missing coverage without being asked: in a sample of one production review per PR (1,331 PRs, Oct 2 to Nov 4), findings about missing coverage were 9% of all findings before #202615, 13% between #202615 and #202952, and 13% after #202952. Per review, the share with at least one blocking missing-test finding was 24% before #202615, 26% between #202615 and #202952, and 36% after #202952: removing the guidance did not change the behavior. This change removes the contradiction; whether it lowers that share is for the production numbers to show.

Evaluation: 10 PRs from ciforge's `recall_full` dataset, the ones where the fan-out review most often asked for tests, each reviewed once with main (47ffd6f) and once with this change, locally with production's prompts and model. A model labelled each finding as asking for tests the PR lacks, about how the PR's tests are written, or other.

| | main | This change |
|---|---|---|
| Findings asking for tests the PR lacks | 8 | 0 |
| Findings about how the PR's tests are written | 27 | 39 |
| All findings | 152 | 163 |
| Blocking findings | 46 | 50 |
| Reviews requesting changes | 10 of 10 | 10 of 10 |

The Tests reviewer stops asking for missing tests and spends that attention on the tests the PR has. Blocking findings and verdicts do not drop; the difference is within run-to-run noise. One run per PR: a signal, not a measurement. These runs used the brief before the checklist and `REVIEW.md` exception was added; of the 8 missing-test findings, one partly asks for a test the checklist requires (`gradcheck` for custom backward logic) and one is about tests the PR deleted; both would still be raised under the final wording.

Test plan:

```
python3 -m unittest discover -s scripts/pr_review -t .
# local replays, once per arm (--main 47ffd6f for main):
python3 run_local_eval.py --dataset recall_full --only <the 10 cases> --main <this commit> --out <dir>
```

This PR was authored with the help of an AI assistant (Claude).

ghstack-source-id: d4c0d17
Pull-Request: #203491
[ghstack-poisoned]
bbayeste added a commit that referenced this pull request Nov 5, 2026
## Linked issue or supporting maintainer

Follow-up to #202615 and #202952.

## BC-breaking?

No.

## Summary (human written only)

Sync with PR #202615 on removing tests review from review agent

## Agent details (if applicable)

#202615 removed the pr-review skill's guidance on whether a PR needs tests and kept the guidance on how tests are written. #202952, which landed three days later, briefed the fan-out Tests reviewer with "missing coverage", so the skill now asks for the judgement #202615 removed.

The Tests brief now covers only how the PR's tests are written (tests that cannot fail or do not check what they claim, flakiness, and the checklist's Testing items) and says that whether the PR needs more tests is not a finding, unless the checklist or an applicable `REVIEW.md` requires the test (for example the adversarial test for a `weights_only` allowlist change in torch/REVIEW.md, or `gradcheck` for custom backward logic), so those requirements still stand. A test the PR deletes without explaining why is still a finding: asking to restore it is not asking for more tests. The explicit sentence is there because the agent raises missing coverage without being asked: in a sample of one production review per PR (1,331 PRs, Oct 2 to Nov 4), findings about missing coverage were 9% of all findings before #202615, 13% between #202615 and #202952, and 13% after #202952. Per review, the share with at least one blocking missing-test finding was 24% before #202615, 26% between #202615 and #202952, and 36% after #202952: removing the guidance did not change the behavior. This change removes the contradiction; whether it lowers that share is for the production numbers to show.

Evaluation: 10 PRs from ciforge's `recall_full` dataset, the ones where the fan-out review most often asked for tests, each reviewed once with main (47ffd6f) and once with this change, locally with production's prompts and model. A model labelled each finding as asking for tests the PR lacks, about how the PR's tests are written, or other.

| | main | This change |
|---|---|---|
| Findings asking for tests the PR lacks | 8 | 0 |
| Findings about how the PR's tests are written | 27 | 39 |
| All findings | 152 | 163 |
| Blocking findings | 46 | 50 |
| Reviews requesting changes | 10 of 10 | 10 of 10 |

The Tests reviewer stops asking for missing tests and spends that attention on the tests the PR has. Blocking findings and verdicts do not drop; the difference is within run-to-run noise. One run per PR: a signal, not a measurement. These runs used the brief before the checklist and `REVIEW.md` exception was added; of the 8 missing-test findings, one partly asks for a test the checklist requires (`gradcheck` for custom backward logic) and one is about tests the PR deleted; both would still be raised under the final wording.

Test plan:

```
python3 -m unittest discover -s scripts/pr_review -t .
# local replays, once per arm (--main 47ffd6f for main):
python3 run_local_eval.py --dataset recall_full --only <the 10 cases> --main <this commit> --out <dir>
```

This PR was authored with the help of an AI assistant (Claude).

ghstack-source-id: 7c08175
Pull-Request: #203491

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review of 84189e7: nothing blocking; ready for human review.

The PR rewrites the fan-out Tests reviewer's brief in SKILL.md so it covers only how the PR's tests are written, says a missing test is not a finding unless the checklist or a REVIEW.md requires it, and flags tests deleted without a reason, which fixes the earlier blocking finding. Recommendation: Approve. The three remaining points are all non-blocking.

⚪ 3 non-blocking findings

- **Tests:** how the PR's tests are written: tests that cannot fail or do not check what they claim, flakiness, and the checklist's Testing items. Whether the PR needs more tests is not a finding unless the checklist or an applicable `REVIEW.md` requires the test. A test the PR deletes without explaining why is a finding.

Non-blocking: the new deletion sentence is narrower than the rule it replaces, and it can also misfire. (1) Weakening isn't covered: loosening atol/rtol, narrowing a @ dtypes/@ parametrize list, or dropping a dtype from an OpInfo entry. "Missing coverage" on main did cover these. OpInfo lives in common_methods_invocations.py, outside test/, so test/REVIEW.md Rule 6 never applies to it. (2) Any reason silences the rule. "Without explaining why" doesn't require the reason to be true or say where it must appear. Rule 6 says "documented in the PR description", and torch/REVIEW.md:20 says the author's claim alone is not enough. (3) Tests that are moved or merged (into OpInfo, @ dtypes or @ parametrize, device-generic files, or classes per test/REVIEW.md Rule 1) show up in the diff as deletions, so a literal reading flags refactors the checklist asked for. Suggested wording: "A test, or test coverage, the PR removes or weakens (other than by moving or merging it) without a reason in the PR description that holds up at HEAD is a finding."


- **Tests:** how the PR's tests are written: tests that cannot fail or do not check what they claim, flakiness, and the checklist's Testing items. Whether the PR needs more tests is not a finding unless the checklist or an applicable `REVIEW.md` requires the test. A test the PR deletes without explaining why is a finding.

Non-blocking, carried over: these rules bind only the Tests sub-agent, and that now includes the new deletion sentence. Nothing tells the lead to apply the "not a finding" rule or the deletion rule. That holds in its own pass (:185, :196), on the no-fan-out path (:198), in the convergence window (:226), and when it merges and checks findings (:214, :220). On those paths the lead falls back to the checklist, whose Testing section (review-checklist.md:184-213) has no item about deleted tests. test/REVIEW.md Scenario 2 Case 1 also turns off Rule 6 for allowlisted files. A deleted-test finding isn't "only in how the tests are written" (precedence rule 6, :283), so it lands under Code Quality (rule 8, :285). Fix: add a Test Quality item next to review-checklist.md:212, or state the rules in Step 4 or in the Output Format's Testing section (:251).


- **Tests:** how the PR's tests are written: tests that cannot fail or do not check what they claim, flakiness, and the checklist's Testing items. Whether the PR needs more tests is not a finding unless the checklist or an applicable `REVIEW.md` requires the test. A test the PR deletes without explaining why is a finding.

Non-blocking, carried over: it is unclear which checklist items the exception covers. The same sentence limits the brief to "the checklist's Testing items" and then makes an exception for "the checklist" as a whole. The test requirements the PR body means (gradcheck, review-checklist.md:98) sit under PyTorch Infrastructure, not Testing. So does the torch.compile/opcheck item (:130), which, read as a test requirement, covers nearly every op change. The Conventions reviewer gets the Infrastructure items (SKILL.md:192) and isn't bound by the "not a finding" rule, so missing-test findings can come back through that reviewer. Fix: name the requirements the exception keeps, e.g. "unless a checklist item (gradcheck, opcheck) or an applicable REVIEW.md requires the test".

This review is AI-generated and advisory. Each new automated review replaces the previous one. Report a bad review

@github-actions
github-actions Bot dismissed stale reviews from themself November 5, 2026 03:28

Withdrawn: the automated review of 84189e7 found nothing blocking.

@bbayeste
bbayeste requested a review from ezyang November 5, 2026 03:40
@bbayeste

bbayeste commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 5, 2026
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorch-bot pytorch-bot Bot added ready for review Automated review passed, ready for a final review by a maintainer. and removed in progress PR is being worked on by the author, until the automated review accepts it labels Nov 5, 2026
dominikjastrzebskix pushed a commit to dominikjastrzebskix/pytorch that referenced this pull request Nov 5, 2026
pytorch#203491)

## Linked issue or supporting maintainer

Follow-up to pytorch#202615 and pytorch#202952.

## BC-breaking?

No.

## Summary (human written only)

Sync with PR pytorch#202615 on removing tests review from review agent

## Agent details (if applicable)

pytorch#202615 removed the pr-review skill's guidance on whether a PR needs tests and kept the guidance on how tests are written. pytorch#202952, which landed three days later, briefed the fan-out Tests reviewer with "missing coverage", so the skill now asks for the judgement pytorch#202615 removed.

The Tests brief now covers only how the PR's tests are written (tests that cannot fail or do not check what they claim, flakiness, and the checklist's Testing items) and says that whether the PR needs more tests is not a finding, unless the checklist or an applicable `REVIEW.md` requires the test (for example the adversarial test for a `weights_only` allowlist change in torch/REVIEW.md, or `gradcheck` for custom backward logic), so those requirements still stand. A test the PR deletes without explaining why is still a finding: asking to restore it is not asking for more tests. The explicit sentence is there because the agent raises missing coverage without being asked: in a sample of one production review per PR (1,331 PRs, Oct 2 to Nov 4), findings about missing coverage were 9% of all findings before pytorch#202615, 13% between pytorch#202615 and pytorch#202952, and 13% after pytorch#202952. Per review, the share with at least one blocking missing-test finding was 24% before pytorch#202615, 26% between pytorch#202615 and pytorch#202952, and 36% after pytorch#202952: removing the guidance did not change the behavior. This change removes the contradiction; whether it lowers that share is for the production numbers to show.

Evaluation: 10 PRs from ciforge's `recall_full` dataset, the ones where the fan-out review most often asked for tests, each reviewed once with main (47ffd6f) and once with this change, locally with production's prompts and model. A model labelled each finding as asking for tests the PR lacks, about how the PR's tests are written, or other.

| | main | This change |
|---|---|---|
| Findings asking for tests the PR lacks | 8 | 0 |
| Findings about how the PR's tests are written | 27 | 39 |
| All findings | 152 | 163 |
| Blocking findings | 46 | 50 |
| Reviews requesting changes | 10 of 10 | 10 of 10 |

The Tests reviewer stops asking for missing tests and spends that attention on the tests the PR has. Blocking findings and verdicts do not drop; the difference is within run-to-run noise. One run per PR: a signal, not a measurement. These runs used the brief before the checklist and `REVIEW.md` exception was added; of the 8 missing-test findings, one partly asks for a test the checklist requires (`gradcheck` for custom backward logic) and one is about tests the PR deleted; both would still be raised under the final wording.

Test plan:

```
python3 -m unittest discover -s scripts/pr_review -t .
# local replays, once per arm (--main 47ffd6f for main):
python3 run_local_eval.py --dataset recall_full --only <the 10 cases> --main <this commit> --out <dir>
```

This PR was authored with the help of an AI assistant (Claude).

Pull Request resolved: pytorch#203491
Approved by: https://github.com/huydhn
dominikjastrzebskix pushed a commit to dominikjastrzebskix/pytorch that referenced this pull request Nov 9, 2026
pytorch#203491)

## Linked issue or supporting maintainer

Follow-up to pytorch#202615 and pytorch#202952.

## BC-breaking?

No.

## Summary (human written only)

Sync with PR pytorch#202615 on removing tests review from review agent

## Agent details (if applicable)

pytorch#202615 removed the pr-review skill's guidance on whether a PR needs tests and kept the guidance on how tests are written. pytorch#202952, which landed three days later, briefed the fan-out Tests reviewer with "missing coverage", so the skill now asks for the judgement pytorch#202615 removed.

The Tests brief now covers only how the PR's tests are written (tests that cannot fail or do not check what they claim, flakiness, and the checklist's Testing items) and says that whether the PR needs more tests is not a finding, unless the checklist or an applicable `REVIEW.md` requires the test (for example the adversarial test for a `weights_only` allowlist change in torch/REVIEW.md, or `gradcheck` for custom backward logic), so those requirements still stand. A test the PR deletes without explaining why is still a finding: asking to restore it is not asking for more tests. The explicit sentence is there because the agent raises missing coverage without being asked: in a sample of one production review per PR (1,331 PRs, Oct 2 to Nov 4), findings about missing coverage were 9% of all findings before pytorch#202615, 13% between pytorch#202615 and pytorch#202952, and 13% after pytorch#202952. Per review, the share with at least one blocking missing-test finding was 24% before pytorch#202615, 26% between pytorch#202615 and pytorch#202952, and 36% after pytorch#202952: removing the guidance did not change the behavior. This change removes the contradiction; whether it lowers that share is for the production numbers to show.

Evaluation: 10 PRs from ciforge's `recall_full` dataset, the ones where the fan-out review most often asked for tests, each reviewed once with main (47ffd6f) and once with this change, locally with production's prompts and model. A model labelled each finding as asking for tests the PR lacks, about how the PR's tests are written, or other.

| | main | This change |
|---|---|---|
| Findings asking for tests the PR lacks | 8 | 0 |
| Findings about how the PR's tests are written | 27 | 39 |
| All findings | 152 | 163 |
| Blocking findings | 46 | 50 |
| Reviews requesting changes | 10 of 10 | 10 of 10 |

The Tests reviewer stops asking for missing tests and spends that attention on the tests the PR has. Blocking findings and verdicts do not drop; the difference is within run-to-run noise. One run per PR: a signal, not a measurement. These runs used the brief before the checklist and `REVIEW.md` exception was added; of the 8 missing-test findings, one partly asks for a test the checklist requires (`gradcheck` for custom backward logic) and one is about tests the PR deleted; both would still be raised under the final wording.

Test plan:

```
python3 -m unittest discover -s scripts/pr_review -t .
# local replays, once per arm (--main 47ffd6f for main):
python3 run_local_eval.py --dataset recall_full --only <the 10 cases> --main <this commit> --out <dir>
```

This PR was authored with the help of an AI assistant (Claude).

Pull Request resolved: pytorch#203491
Approved by: https://github.com/huydhn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged ready for review Automated review passed, ready for a final review by a maintainer. topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants