Repository navigation
Conversation
As agreed at the composability sync, the automated reviewer should not decide whether a PR needs tests. Drop the checklist items that require tests to exist or cover edge cases, the OpInfo item's ask to extend single-operator tests to all operators, and the "missing tests means Request Changes" rule. Guidance on how to write tests (Test Patterns, xfail over skip, weakref, assertRaisesRegex) stays, and the Testing review section is rescoped to it. Test Plan: ``` python3 -m unittest discover -s scripts/pr_review -t . lintrunner ``` The two TestTheSuiteActuallyRunsInCI failures reproduce on the base commit in this environment. This PR was authored with the assistance of an AI agent.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/202615
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ⏳ No Failures, 17 PendingAs of commit dd5bf96 with merge base 421855c ( 🟡 GREEN LIGHT - OUTDATED (earlier commit) - PR requires human review:
reason: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
|
||
| - [ ] **Proper module ownership** - Test files must have a real `# Owner(s): ["module: ..."]` label, not `"module: unknown"`. The author should create a new module label if needed and add themselves as owner | ||
| - [ ] **Use OpInfo** - Any testing for an operator or a cross-cutting feature must be done via OpInfo. Flag manual tests (e.g., `assertEqual(a + b, expected)`) for operators that already have OpInfo entries — these are redundant and will rot. When a PR adds dtype/device support to an operator, the testing should come from existing OpInfo infrastructure automatically (e.g., by adding the dtype to the operator's OpInfo `dtypes`), not from new manual tests. Likewise, a test checking a specific behavior for a single operator should not be a standalone test — the OpInfo infrastructure for that test category should be updated to cover the behavior across all applicable operators | ||
| - [ ] **Use OpInfo** - Any testing for an operator or a cross-cutting feature must be done via OpInfo. Flag manual tests (e.g., `assertEqual(a + b, expected)`) for operators that already have OpInfo entries — these are redundant and will rot. When a PR adds dtype/device support to an operator, the testing should come from existing OpInfo infrastructure automatically (e.g., by adding the dtype to the operator's OpInfo `dtypes`), not from new manual tests |
There was a problem hiding this comment.
- Use toleranceOverride - PR hard-codes tolerance values in individual assertions instead of using
@toleranceOverride/@precisionOverridedecorators which set per-dtype tolerances - Use DecorateInfo for OpInfo skips - PR adds
@skipIfconditionals inside OpInfo test methods instead of usingDecorateInfoin the OpInfo'sskipsordecoratorstuple
shoudl this go in reveiw.md closer to opinfos?
There was a problem hiding this comment.
Claude is reluctant to do this because it involves a bunch of surgery, I'll give you a follow up PR for it.
|
@pytorchbot merge -f "ci unnecessary" |
janeyx99
left a comment
There was a problem hiding this comment.
Looks like we can do a general followup sweep to move certain pieces to more local REVIEW.md's, like the sections above (e.g., Dynamo / Inductor / Compile) but not urgent and not in scope of PR
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
There was a problem hiding this comment.
Automated review of dd5bf96: nothing blocking; ready for human review.
The PR removes the pr-review skill's guidance on whether a PR needs tests and keeps the guidance on how to write them. Both maintainer comments are handled, but two checklist items (review-checklist.md:98 gradcheck and :130 torch.compile compatibility) still require tests to exist. Recommendation: Needs Discussion.
⚪ 1 non-blocking finding
review-checklist.md:98 (gradcheck testing) and :130 (torch.compile compatibility) still require tests to exist, which goes against the goal of this PR. (They are outside the diff, so this is anchored to the ### Test Patterns heading.) The PR description is wrong to list them under Left alone as "test-writing items". :98 flags custom backward logic that isn't tested with torch.autograd.gradcheck(), and :130 flags an op that isn't verified under torch.compile. Both are missing-test checks. In practice: a PR adds a custom autograd.Function backward with no gradient test. A reviewer following :98 still files "add a gradcheck test". Because the new SKILL.md:261 limits Testing to "how the tests are written", the finding moves to Infrastructure (precedence 5). So the when-to-test rule survives in another section and the reviewer gets mixed signals. Fix: reword both as how-to rules. :98: "PR checks custom backward gradients with hand-written comparisons instead of gradcheck() / gradgradcheck()". :130: "PR checks torch.compile compatibility with ad-hoc compiled-vs-eager tests instead of torch.library.opcheck / pt2_compliant_tag". Otherwise, state the exception in the PR description.
This review is AI-generated and advisory. Each new automated review replaces the previous one.
## Human Note Opus misunderstood Driss's meaning, this is actually very small ## Agent Report ### What changed Follow-up to #202615, from a review comment there on the "Use OpInfo" checklist item. Moves "Use toleranceOverride" and "Use DecorateInfo for OpInfo skips" up in `.agents/skills/pr-review/review-checklist.md` so they sit directly after "Use OpInfo". The text of every item is unchanged; this is a pure reorder. ### Validation Markdown-only change. ``` python3 -m unittest discover -s scripts/pr_review -t . lintrunner ``` <details> <summary>Agent Worklog</summary> ### 2026-10-29 - Review comment on #202615, anchored on the "Use OpInfo" line, quoted the toleranceOverride / DecorateInfo items and asked whether they should go "closer to opinfos". - A directory REVIEW.md was considered and rejected: REVIEW.md only applies to changed files under its directory, and these items are violated in test files spread across test/. Read the comment as asking to group the items with "Use OpInfo" in the checklist. </details> --- *This PR was generated by [ptq](https://github.com/drisspg/pt_job_queue) with human review.* Pull Request resolved: #202617 Approved by: https://github.com/Skylion007, https://github.com/drisspg
…2802) ✴️ iz2: `add_numbered_label("merged")` counted every label containing "merged", so a PR carrying the unrelated `mergedog` label landed as `mergedX1` instead of `Merged` (e.g. #202615, #202617; 90 PRs carry `mergedX1`). Anything that checks for `Merged` then reads these lands as closed unmerged. #98551 meant the numbering to count only the label's own repeats. This change counts only labels equal to the base or fully matching `<base>X<n>`. Matching stays case-sensitive on purpose. The repo labels are `Merged` and `Reverted`, which `"merged" in "Merged"` never matched, so re-merges have always kept plain `Merged` (no PR carries `Merged` + `mergedX1` without `mergedog`, and none carries `revertedX1`). This keeps that behaviour; only PRs with a substring-matching label change. Test plan: new `TestAddNumberedLabel` cases (`mergedog`, `mergedX1foo`/`mergedx1`, `Merged`, own repeats) fail on the old condition and pass with the fix. `python -m unittest test_trymerge`: 216 run, all pass except two git end-to-end tests that fail identically on unmodified main in my environment (tmp-dir cleanup `OSError`). Pull Request resolved: #202802 Approved by: https://github.com/huydhn
## 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
## 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
## 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
## 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
## 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
## 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
#203491) ## 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). Pull Request resolved: #203491 Approved by: https://github.com/huydhn
## Human Note Based on composability discussion. I ended up keeping things that were about how to write tests, rather than if they should exist. ## Agent Report ### What changed The pr-review skill no longer tells the reviewer when a PR needs tests. Guidance on how to write tests stays. - `.agents/skills/pr-review/review-checklist.md`: drops the `### Test Existence` subsection's "Tests exist" and "Regression tests for bug fixes" items (its placement items, "Tests are in the right place" and "New test file is rare", move to `### Test Patterns`), drops "Edge cases covered" from `### Test Quality`, and trims the "Use OpInfo" item's last sentence, which asked for single-operator behavior tests to be extended to all applicable operators. "Error conditions tested" becomes "Use assertRaisesRegex for expected exceptions": it says how to write an exception test, not when one is needed. "No duplicated test logic", "Prefer xfail over skip", and "Use weakref for lifetime testing" are unchanged. - `.agents/skills/pr-review/SKILL.md`: drops test coverage from the description and review focus (the focus now says "test patterns"), drops "tests that should exist" from what sub-agents look for, drops the rule that missing tests always mean **Request Changes** (the unaddressed-maintainer-comment rule stays), and rescopes the `### Testing` output section and its precedence entry to how the tests are written. The "One finding, one section" example no longer uses a missing test. ### Left alone - `CLAUDE.md` / `AGENTS.md`: its Testing section only says how to write tests. - Test-writing items elsewhere in the checklist (Testing implications, gradcheck, config.patch, torch.compile compatibility, Distributed testing). ### Validation Markdown-only change. The pr-review skill files are hashed into the hardened review's prompt hash, so the pr_review script suite runs on this PR: ``` python3 -m unittest discover -s scripts/pr_review -t . ``` 526 tests; the two failures in `TestTheSuiteActuallyRunsInCI` fail identically on the unmodified base in this environment. `lintrunner` reports no issues. <details> <summary>Agent Worklog</summary> ### 2026-10-29 - Goal: remove explicit test guidance from CLAUDE.md / AGENTS.md and the pr-review skill. - Edited CLAUDE.md, .agents/skills/pr-review/SKILL.md, .agents/skills/pr-review/review-checklist.md. bc-guidelines.md and ci-runner-naming.md contain no test guidance. - No duplicate open PR found via `gh search prs`. - pr_review unittest suite: same 2 env failures with and without the change; lintrunner clean. - Narrowed per review: keep CLAUDE.md and all test-writing guidance; remove only when-to-test guidance from the pr-review skill. </details> --- *This PR was generated by [ptq](https://github.com/drisspg/pt_job_queue) with human review.* Pull Request resolved: pytorch#202615 Approved by: https://github.com/drisspg, https://github.com/janeyx99, https://github.com/albanD
…#202617) ## Human Note Opus misunderstood Driss's meaning, this is actually very small ## Agent Report ### What changed Follow-up to pytorch#202615, from a review comment there on the "Use OpInfo" checklist item. Moves "Use toleranceOverride" and "Use DecorateInfo for OpInfo skips" up in `.agents/skills/pr-review/review-checklist.md` so they sit directly after "Use OpInfo". The text of every item is unchanged; this is a pure reorder. ### Validation Markdown-only change. ``` python3 -m unittest discover -s scripts/pr_review -t . lintrunner ``` <details> <summary>Agent Worklog</summary> ### 2026-10-29 - Review comment on pytorch#202615, anchored on the "Use OpInfo" line, quoted the toleranceOverride / DecorateInfo items and asked whether they should go "closer to opinfos". - A directory REVIEW.md was considered and rejected: REVIEW.md only applies to changed files under its directory, and these items are violated in test files spread across test/. Read the comment as asking to group the items with "Use OpInfo" in the checklist. </details> --- *This PR was generated by [ptq](https://github.com/drisspg/pt_job_queue) with human review.* Pull Request resolved: pytorch#202617 Approved by: https://github.com/Skylion007, https://github.com/drisspg
…orch#202802) ✴️ iz2: `add_numbered_label("merged")` counted every label containing "merged", so a PR carrying the unrelated `mergedog` label landed as `mergedX1` instead of `Merged` (e.g. pytorch#202615, pytorch#202617; 90 PRs carry `mergedX1`). Anything that checks for `Merged` then reads these lands as closed unmerged. pytorch#98551 meant the numbering to count only the label's own repeats. This change counts only labels equal to the base or fully matching `<base>X<n>`. Matching stays case-sensitive on purpose. The repo labels are `Merged` and `Reverted`, which `"merged" in "Merged"` never matched, so re-merges have always kept plain `Merged` (no PR carries `Merged` + `mergedX1` without `mergedog`, and none carries `revertedX1`). This keeps that behaviour; only PRs with a substring-matching label change. Test plan: new `TestAddNumberedLabel` cases (`mergedog`, `mergedX1foo`/`mergedx1`, `Merged`, own repeats) fail on the old condition and pass with the fix. `python -m unittest test_trymerge`: 216 run, all pass except two git end-to-end tests that fail identically on unmodified main in my environment (tmp-dir cleanup `OSError`). Pull Request resolved: pytorch#202802 Approved by: https://github.com/huydhn
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
## Human Note Based on composability discussion. I ended up keeping things that were about how to write tests, rather than if they should exist. ## Agent Report ### What changed The pr-review skill no longer tells the reviewer when a PR needs tests. Guidance on how to write tests stays. - `.agents/skills/pr-review/review-checklist.md`: drops the `### Test Existence` subsection's "Tests exist" and "Regression tests for bug fixes" items (its placement items, "Tests are in the right place" and "New test file is rare", move to `### Test Patterns`), drops "Edge cases covered" from `### Test Quality`, and trims the "Use OpInfo" item's last sentence, which asked for single-operator behavior tests to be extended to all applicable operators. "Error conditions tested" becomes "Use assertRaisesRegex for expected exceptions": it says how to write an exception test, not when one is needed. "No duplicated test logic", "Prefer xfail over skip", and "Use weakref for lifetime testing" are unchanged. - `.agents/skills/pr-review/SKILL.md`: drops test coverage from the description and review focus (the focus now says "test patterns"), drops "tests that should exist" from what sub-agents look for, drops the rule that missing tests always mean **Request Changes** (the unaddressed-maintainer-comment rule stays), and rescopes the `### Testing` output section and its precedence entry to how the tests are written. The "One finding, one section" example no longer uses a missing test. ### Left alone - `CLAUDE.md` / `AGENTS.md`: its Testing section only says how to write tests. - Test-writing items elsewhere in the checklist (Testing implications, gradcheck, config.patch, torch.compile compatibility, Distributed testing). ### Validation Markdown-only change. The pr-review skill files are hashed into the hardened review's prompt hash, so the pr_review script suite runs on this PR: ``` python3 -m unittest discover -s scripts/pr_review -t . ``` 526 tests; the two failures in `TestTheSuiteActuallyRunsInCI` fail identically on the unmodified base in this environment. `lintrunner` reports no issues. <details> <summary>Agent Worklog</summary> ### 2026-10-29 - Goal: remove explicit test guidance from CLAUDE.md / AGENTS.md and the pr-review skill. - Edited CLAUDE.md, .agents/skills/pr-review/SKILL.md, .agents/skills/pr-review/review-checklist.md. bc-guidelines.md and ci-runner-naming.md contain no test guidance. - No duplicate open PR found via `gh search prs`. - pr_review unittest suite: same 2 env failures with and without the change; lintrunner clean. - Narrowed per review: keep CLAUDE.md and all test-writing guidance; remove only when-to-test guidance from the pr-review skill. </details> --- *This PR was generated by [ptq](https://github.com/drisspg/pt_job_queue) with human review.* Pull Request resolved: pytorch#202615 Approved by: https://github.com/drisspg, https://github.com/janeyx99, https://github.com/albanD
…#202617) ## Human Note Opus misunderstood Driss's meaning, this is actually very small ## Agent Report ### What changed Follow-up to pytorch#202615, from a review comment there on the "Use OpInfo" checklist item. Moves "Use toleranceOverride" and "Use DecorateInfo for OpInfo skips" up in `.agents/skills/pr-review/review-checklist.md` so they sit directly after "Use OpInfo". The text of every item is unchanged; this is a pure reorder. ### Validation Markdown-only change. ``` python3 -m unittest discover -s scripts/pr_review -t . lintrunner ``` <details> <summary>Agent Worklog</summary> ### 2026-10-29 - Review comment on pytorch#202615, anchored on the "Use OpInfo" line, quoted the toleranceOverride / DecorateInfo items and asked whether they should go "closer to opinfos". - A directory REVIEW.md was considered and rejected: REVIEW.md only applies to changed files under its directory, and these items are violated in test files spread across test/. Read the comment as asking to group the items with "Use OpInfo" in the checklist. </details> --- *This PR was generated by [ptq](https://github.com/drisspg/pt_job_queue) with human review.* Pull Request resolved: pytorch#202617 Approved by: https://github.com/Skylion007, https://github.com/drisspg
…orch#202802) ✴️ iz2: `add_numbered_label("merged")` counted every label containing "merged", so a PR carrying the unrelated `mergedog` label landed as `mergedX1` instead of `Merged` (e.g. pytorch#202615, pytorch#202617; 90 PRs carry `mergedX1`). Anything that checks for `Merged` then reads these lands as closed unmerged. pytorch#98551 meant the numbering to count only the label's own repeats. This change counts only labels equal to the base or fully matching `<base>X<n>`. Matching stays case-sensitive on purpose. The repo labels are `Merged` and `Reverted`, which `"merged" in "Merged"` never matched, so re-merges have always kept plain `Merged` (no PR carries `Merged` + `mergedX1` without `mergedog`, and none carries `revertedX1`). This keeps that behaviour; only PRs with a substring-matching label change. Test plan: new `TestAddNumberedLabel` cases (`mergedog`, `mergedX1foo`/`mergedx1`, `Merged`, own repeats) fail on the old condition and pass with the fix. `python -m unittest test_trymerge`: 216 run, all pass except two git end-to-end tests that fail identically on unmodified main in my environment (tmp-dir cleanup `OSError`). Pull Request resolved: pytorch#202802 Approved by: https://github.com/huydhn
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
Human Note
Based on composability discussion. I ended up keeping things that were about how to write tests, rather than if they should exist.
Agent Report
What changed
The pr-review skill no longer tells the reviewer when a PR needs tests. Guidance on how to write tests stays.
.agents/skills/pr-review/review-checklist.md: drops the### Test Existencesubsection's "Tests exist" and "Regression tests for bug fixes" items (its placement items, "Tests are in the right place" and "New test file is rare", move to### Test Patterns), drops "Edge cases covered" from### Test Quality, and trims the "Use OpInfo" item's last sentence, which asked for single-operator behavior tests to be extended to all applicable operators. "Error conditions tested" becomes "Use assertRaisesRegex for expected exceptions": it says how to write an exception test, not when one is needed. "No duplicated test logic", "Prefer xfail over skip", and "Use weakref for lifetime testing" are unchanged..agents/skills/pr-review/SKILL.md: drops test coverage from the description and review focus (the focus now says "test patterns"), drops "tests that should exist" from what sub-agents look for, drops the rule that missing tests always mean Request Changes (the unaddressed-maintainer-comment rule stays), and rescopes the### Testingoutput section and its precedence entry to how the tests are written. The "One finding, one section" example no longer uses a missing test.Left alone
CLAUDE.md/AGENTS.md: its Testing section only says how to write tests.Validation
Markdown-only change. The pr-review skill files are hashed into the hardened review's prompt hash, so the pr_review script suite runs on this PR:
526 tests; the two failures in
TestTheSuiteActuallyRunsInCIfail identically on the unmodified base in this environment.lintrunnerreports no issues.Agent Worklog
2026-10-29
gh search prs.This PR was generated by ptq with human review.