Repository navigation
Conversation
[ghstack-poisoned]
PR Status: Approved 🚀Please fix all CI failures and trigger merge by commenting "@pytorchbot merge". ✅ AUTOMATED REVIEW - Ready for human review:
Findings (3): Reviewed commit: 🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/203531
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit dad10dd with merge base 2501aef ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
[ghstack-poisoned]
## Linked issue or supporting maintainer Related to #202634 (non-blocking points on re-reviews). ## BC-breaking? No. ## Summary (human written only) Clarify the severity issue vs everything must be blocking ## Agent details (if applicable) Review Philosophy 5, "Everything is a must-fix", makes every point the review raises a reason to block, so the agent requests changes on most PRs it reviews: in production at the end of October it requested changes on about 80-90% of the PRs it reviewed each day, while maintainers requested changes on about 20% of the PRs they reviewed. torchtitan's pr-review skill instead sorts findings into must-fix and should-consider and approves when only small, local items remain. This replaces item 5 with "Separate blocking from non-blocking": a point is blocking when the PR should not land until it is fixed (a correctness or security bug, a backward-compatibility break, a design problem that needs another look once addressed, or an unaddressed maintainer comment); everything else worth mentioning is written as "non-blocking". The blocking list keeps every rule in this skill's files that says a point always blocks or always means Request Changes (a non-exempt CI install, a new non-conforming runner label, the decref-before-update hazard), and review-checklist.md and ci-runner-naming.md no longer call those exceptions to "Everything is a must-fix". The Recommendation section now says to request changes only for a blocking point and to approve, listing the non-blocking points, when only those remain, except where the Time Budget says otherwise. The rest of the pipeline already handles non-blocking points since #202634: stage B records a point labelled non-blocking as `minor`, a review whose points are all non-blocking becomes `ready_for_human_review`, and post_review.py folds minor findings into a collapsed section instead of posting them as blockers. Evaluation: 30 clean PRs (a maintainer approved without comments; merged, never reverted) from ciforge's clean_approved, balanced across areas, and the 30 dev-split PRs of recall_strong with 45 maintainer issues the author fixed before merge (one more dev PR was skipped as too large by both versions). Local runs with production's prompts and model, one review per PR, main against this change: | | main | This change | |---|---|---| | Clean PRs blocked | 25 of 30 | 11 of 30 | | Blocking findings on those PRs | 93 | 23 | | All findings on those PRs | 166 | 170 | | Maintainer issues found | 27 of 45 | 27 of 45 | | Maintainer issues found and marked blocking | 14 | 12 | | Defects found / marked blocking | 4 / 2 | 5 / 1 | The change reports as many findings and finds the same maintainer issues (24 found by both, 3 only by each), but grades most findings non-blocking, so it blocks 11 clean PRs instead of 25. It also grades some real defects non-blocking: of the 5 defects it found, it marked 1 blocking, against 2 of 4 for main. A maintainer issue counts as found when an LLM judge matches one of the agent's findings to it by root cause. The runs used this change before the always-blocking rules and the Time Budget exception were added; none of the evaluated reviews raised a CI install, a runner label, a decref hazard or an early post. 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: 4c76301 Pull-Request: #203531
[ghstack-poisoned]
## Linked issue or supporting maintainer Related to #202634 (non-blocking points on re-reviews). ## BC-breaking? No. ## Summary (human written only) Clarify the severity issue vs everything must be blocking ## Agent details (if applicable) Review Philosophy 5, "Everything is a must-fix", makes every point the review raises a reason to block, so the agent requests changes on most PRs it reviews: in production at the end of October it requested changes on about 80-90% of the PRs it reviewed each day, while maintainers requested changes on about 20% of the PRs they reviewed. torchtitan's pr-review skill instead sorts findings into must-fix and should-consider and approves when only small, local items remain. This replaces item 5 with "Separate blocking from non-blocking": a point is blocking when the PR should not land until it is fixed (a correctness or security bug, a backward-compatibility break, a design problem that needs another look once addressed, or an unaddressed maintainer comment); everything else worth mentioning is written as "non-blocking". The blocking list keeps every rule in this skill's files or an applicable REVIEW.md that says a point always blocks or defaults to Request Changes (a non-exempt CI install, a new non-conforming runner label, the decref-before-update hazard, a new weights_only allowlist entry), and says that a performance regression on a hot path blocks and that a missing test blocks only when the checklist or an applicable REVIEW.md requires it. Principle 7 now says a pattern mismatch within a file is always worth raising and blocks only when principle 5 says so, and review-checklist.md and ci-runner-naming.md no longer call those exceptions to "Everything is a must-fix". The Recommendation section now says to request changes only for a blocking point, to recommend Needs Discussion when the decision depends on maintainers (an open design question, or a potentially breaking change), and otherwise to approve when only non-blocking points remain, with those points kept in their own sections; the Time Budget's early-post rules come first. A contract test checks that SKILL.md still writes the "non-blocking" label stage B maps to `minor`. The rest of the pipeline already handles non-blocking points since #202634: stage B records a point labelled non-blocking as `minor`, a review whose points are all non-blocking becomes `ready_for_human_review`, and post_review.py folds minor findings into a collapsed section instead of posting them as blockers. Evaluation: 30 clean PRs (a maintainer approved without comments; merged, never reverted) from ciforge's clean_approved, balanced across areas, and the 30 dev-split PRs of recall_strong with 45 maintainer issues the author fixed before merge (one more dev PR was skipped as too large by both versions). Local runs with production's prompts and model, one review per PR, main against this change: | | main | This change | |---|---|---| | Clean PRs blocked | 25 of 30 | 11 of 30 | | Blocking findings on those PRs | 93 | 23 | | All findings on those PRs | 166 | 170 | | Maintainer issues found | 27 of 45 | 27 of 45 | | Maintainer issues found and marked blocking | 14 | 12 | | Defects found / marked blocking | 4 / 2 | 5 / 1 | The change reports as many findings and finds the same maintainer issues (24 found by both, 3 only by each), but grades most findings non-blocking, so it blocks 11 clean PRs instead of 25. It also grades some real defects non-blocking: of the 5 defects it found, it marked 1 blocking, against 2 of 4 for main. A maintainer issue counts as found when an LLM judge matches one of the agent's findings to it by root cause. The runs used an earlier version of this change, before the always-blocking rules, the Time Budget and Needs Discussion rules, the performance and missing-test grading and the principle 7 rewording were added. 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: 8e5d417 Pull-Request: #203531
| 3. **Review the design, not just the implementation** — A PR can have perfectly correct implementation of a bad design. Question side-channel communication, on/off private flags, and demand concrete interface documentation for new contracts between components. | ||
| 4. **Focus on what CI cannot check** — Don't comment on formatting, linting, type errors, or CI failures. Focus on design quality, interface correctness, thread safety, BC implications, test patterns, and pattern adherence. | ||
| 5. **Everything is a must-fix** — There are no "nits." If it's worth mentioning, it's worth fixing. Every inconsistency degrades the codebase over time. Exceptions are marked where they apply; on a re-review, "Re-reviews converge" makes some points non-blocking. | ||
| 5. **Separate blocking from non-blocking** — A point is blocking when the PR should not land until it is fixed: a correctness or security bug, a backward-compatibility break, a design problem that needs another look once addressed, an unaddressed maintainer comment, or anything a rule in this skill's files or an applicable `REVIEW.md` says always blocks or defaults to **Request Changes** (for example a non-exempt CI install, or a runner label that breaks the naming standard and no other CI uses). A performance regression on a hot path is blocking; a missing test is blocking only when the checklist or an applicable `REVIEW.md` requires that test. Everything else worth mentioning (naming, small refactors, consistency with nearby code, wording of comments and docs) is non-blocking: write "non-blocking" in it. Do not stretch a point to make it blocking. |
There was a problem hiding this comment.
This has some overlapping with #203308, let's coordinate with @izaitsevfb
There was a problem hiding this comment.
Automated review of dad10dd: nothing blocking; ready for human review.
This PR replaces pr-review's "Everything is a must-fix" principle with a split between blocking and non-blocking points, and adds a contract test for the "non-blocking" label that stage B reads. Recommendation: Approve. The earlier blocking findings and albanD's request are addressed at HEAD, and only three non-blocking points remain.
⚪ 3 non-blocking findings
pytorch/.agents/skills/pr-review/SKILL.md
Line 122 in dad10dd
Non-blocking: prohibitions worded differently from the catch-all are easy to grade non-blocking. Principle 5's catch-all names rules that "always block or default to Request Changes", then says "Do not stretch a point to make it blocking". Hard prohibitions use other wording and match none of the listed triggers, e.g. tools/linter/adapters/REVIEW.md:9-11: "test_linter_allowlist.json must only shrink adding entries in any other PR is not allowed". Such a rule does fit the opening definition ("should not land until it is fixed"), so this is ambiguous rather than a sure downgrade, but a reviewer can read the list strictly, grade a new allowlist entry non-blocking and recommend Approve, where it blocked under the old principle 5. Fix: extend the catch-all to "anything a rule forbids, or says always blocks or defaults to Request Changes".
pytorch/.agents/skills/pr-review/SKILL.md
Line 271 in dad10dd
Non-blocking: the Needs Discussion trigger cites bc-guidelines.md too broadly. The new text sends "a potentially breaking change (bc-guidelines.md)" to Needs Discussion, but bc-guidelines.md:5 and :28 call any user-visible behavior change "Potentially breaking"; only :6 then sorts these into "not exercised in practice, a bug fix or a voluntary BC-breaking change". Read literally, this pulls ordinary behavior-changing PRs into Needs Discussion instead of Approve. Point it at changes still potentially breaking after the :6 classification. Related gap: principle 5 has only two grades, so the point triggering Needs Discussion must be written "non-blocking"; stage B records it as minor (hardened-pr-review-run.yml:1100-1101) and post_review.py:428 folds it into the collapsed non-blocking section, hiding the point that holds the PR for a maintainer. Say how to label such a point.
Non-blocking: the new test repeats an existing assertion and overstates the failure. The assertion at :5747, "A point the review labels non-blocking is minor", is a prefix of the stricter one at :5800-5803 in test_a_non_blocking_point_never_posts_as_a_blocker, in the same class against the same prompt, so it can never fail on its own. The comment at :5741-5742 says that without the label "every point posts as a blocker", but blocking_findings (post_review.py:315-320) only does that under changes_requested with no major finding, as the comment at :5796-5798 correctly says. Fix: move the two SKILL.md assertions (:5744-5745) into test_a_non_blocking_point_never_posts_as_a_blocker and drop the duplicate, or keep the new test, delete its stage-B assertion and correct the comment.
This review is AI-generated and advisory. Each new automated review replaces the previous one. Report a bad review
Withdrawn: the automated review of dad10dd found nothing blocking.
|
@pytorchbot merge |
Merge startedYour 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 |
) ## Linked issue or supporting maintainer Related to pytorch#202634 (non-blocking points on re-reviews). ## BC-breaking? No. ## Summary (human written only) Clarify the severity issue vs everything must be blocking ## Agent details (if applicable) Review Philosophy 5, "Everything is a must-fix", makes every point the review raises a reason to block, so the agent requests changes on most PRs it reviews: in production at the end of October it requested changes on about 80-90% of the PRs it reviewed each day, while maintainers requested changes on about 20% of the PRs they reviewed. torchtitan's pr-review skill instead sorts findings into must-fix and should-consider and approves when only small, local items remain. This replaces item 5 with "Separate blocking from non-blocking": a point is blocking when the PR should not land until it is fixed (a correctness or security bug, a backward-compatibility break, a design problem that needs another look once addressed, or an unaddressed maintainer comment); everything else worth mentioning is written as "non-blocking". The blocking list keeps every rule in this skill's files or an applicable REVIEW.md that says a point always blocks or defaults to Request Changes (a non-exempt CI install, a new non-conforming runner label, the decref-before-update hazard, a new weights_only allowlist entry), and says that a performance regression on a hot path blocks and that a missing test blocks only when the checklist or an applicable REVIEW.md requires it. Principle 7 now says a pattern mismatch within a file is always worth raising and blocks only when principle 5 says so, and review-checklist.md and ci-runner-naming.md no longer call those exceptions to "Everything is a must-fix". The Recommendation section now says to request changes only for a blocking point, to recommend Needs Discussion when the decision depends on maintainers (an open design question, or a potentially breaking change), and otherwise to approve when only non-blocking points remain, with those points kept in their own sections; the Time Budget's early-post rules come first. A contract test checks that SKILL.md still writes the "non-blocking" label stage B maps to `minor`. The rest of the pipeline already handles non-blocking points since pytorch#202634: stage B records a point labelled non-blocking as `minor`, a review whose points are all non-blocking becomes `ready_for_human_review`, and post_review.py folds minor findings into a collapsed section instead of posting them as blockers. Evaluation: 30 clean PRs (a maintainer approved without comments; merged, never reverted) from ciforge's clean_approved, balanced across areas, and the 30 dev-split PRs of recall_strong with 45 maintainer issues the author fixed before merge (one more dev PR was skipped as too large by both versions). Local runs with production's prompts and model, one review per PR, main against this change: | | main | This change | |---|---|---| | Clean PRs blocked | 25 of 30 | 11 of 30 | | Blocking findings on those PRs | 93 | 23 | | All findings on those PRs | 166 | 170 | | Maintainer issues found | 27 of 45 | 27 of 45 | | Maintainer issues found and marked blocking | 14 | 12 | | Defects found / marked blocking | 4 / 2 | 5 / 1 | The change reports as many findings and finds the same maintainer issues (24 found by both, 3 only by each), but grades most findings non-blocking, so it blocks 11 clean PRs instead of 25. It also grades some real defects non-blocking: of the 5 defects it found, it marked 1 blocking, against 2 of 4 for main. A maintainer issue counts as found when an LLM judge matches one of the agent's findings to it by root cause. The runs used an earlier version of this change, before the always-blocking rules, the Time Budget and Needs Discussion rules, the performance and missing-test grading and the principle 7 rewording were added. Test plan: ``` python3 -m unittest discover -s scripts/pr_review -t . ``` This PR was authored with the help of an AI assistant (Claude). Pull Request resolved: pytorch#203531 Approved by: https://github.com/albanD, https://github.com/atalman
Non-blocking findings were folded into one collapsed section of the review body. Most findings are non-blocking since #203531, so most of what the review says sat behind one click, away from the code it is about. Nobody could reply to one finding or react to it, so a thumbs-down could not settle it and there was no per-finding signal on non-blocking findings. `post_review.py` now posts every finding on its line: - A blocking finding is unchanged: marked 🔴 and shown in full. - A non-blocking finding is a collapsed block. Its summary is ⚪ and the finding's first sentence, labelled "Non-blocking" unless the sentence already says so. The rest of the message is under it. The "Report this finding" link stays visible below the block. - The summary line is part of an HTML block, so markdown there is not rendered. Messages arrive already neutralized, so the summary is unescaped to the text a reader should see and escaped once. Neutralize's `\[`, `\]` and `\#` escapes and bold markers are dropped, and code spans become `<code>`. The whole summary, label included, is cut at 150 characters at a word, and a cut summary has the full message under it. The review body says how many findings of each kind are attached to the code. The collapsed body section is kept for findings that cannot go inline: those next to an earlier thread someone replied to, and any GitHub refuses. GitHub refuses every inline comment when it refuses one, so a refused review is retried with only the blocking findings inline before everything falls back to the body. The verdict and the review event are unchanged. Most findings are now inline, so taking down a superseded review can cost a delete per finding. Those deletes are paced, as backfill's already are. Test plan: `python3 -m unittest discover -s scripts/pr_review -t .`, 681 pass. New tests cover the summary on neutralized input (escaped once, no markdown escapes, the label added once, abbreviations, the length cap), the retry with only blocking findings inline, and the paced deletes. The body-only tests (folding, the size cap, fence containment, permalinks) run through the refused-inline fallback and check that the inline attempt was refused first. Pull Request resolved: #206357 Approved by: https://github.com/albanD, https://github.com/huydhn
Stack from ghstack (oldest at bottom):
Linked issue or supporting maintainer
Related to #202634 (non-blocking points on re-reviews).
BC-breaking?
No.
Summary (human written only)
Clarify the severity issue vs everything must be blocking
Agent details (if applicable)
Review Philosophy 5, "Everything is a must-fix", makes every point the review raises a reason to block, so the agent requests changes on most PRs it reviews: in production at the end of October it requested changes on about 80-90% of the PRs it reviewed each day, while maintainers requested changes on about 20% of the PRs they reviewed. torchtitan's pr-review skill instead sorts findings into must-fix and should-consider and approves when only small, local items remain.
This replaces item 5 with "Separate blocking from non-blocking": a point is blocking when the PR should not land until it is fixed (a correctness or security bug, a backward-compatibility break, a design problem that needs another look once addressed, or an unaddressed maintainer comment); everything else worth mentioning is written as "non-blocking". The blocking list keeps every rule in this skill's files or an applicable REVIEW.md that says a point always blocks or defaults to Request Changes (a non-exempt CI install, a new non-conforming runner label, the decref-before-update hazard, a new weights_only allowlist entry), and says that a performance regression on a hot path blocks and that a missing test blocks only when the checklist or an applicable REVIEW.md requires it. Principle 7 now says a pattern mismatch within a file is always worth raising and blocks only when principle 5 says so, and review-checklist.md and ci-runner-naming.md no longer call those exceptions to "Everything is a must-fix". The Recommendation section now says to request changes only for a blocking point, to recommend Needs Discussion when the decision depends on maintainers (an open design question, or a potentially breaking change), and otherwise to approve when only non-blocking points remain, with those points kept in their own sections; the Time Budget's early-post rules come first. A contract test checks that SKILL.md still writes the "non-blocking" label stage B maps to
minor.The rest of the pipeline already handles non-blocking points since #202634: stage B records a point labelled non-blocking as
minor, a review whose points are all non-blocking becomesready_for_human_review, and post_review.py folds minor findings into a collapsed section instead of posting them as blockers.Evaluation: 30 clean PRs (a maintainer approved without comments; merged, never reverted) from ciforge's clean_approved, balanced across areas, and the 30 dev-split PRs of recall_strong with 45 maintainer issues the author fixed before merge (one more dev PR was skipped as too large by both versions). Local runs with production's prompts and model, one review per PR, main against this change:
The change reports as many findings and finds the same maintainer issues (24 found by both, 3 only by each), but grades most findings non-blocking, so it blocks 11 clean PRs instead of 25. It also grades some real defects non-blocking: of the 5 defects it found, it marked 1 blocking, against 2 of 4 for main. A maintainer issue counts as found when an LLM judge matches one of the agent's findings to it by root cause. The runs used an earlier version of this change, before the always-blocking rules, the Time Budget and Needs Discussion rules, the performance and missing-test grading and the principle 7 rewording were added.
Test plan:
This PR was authored with the help of an AI assistant (Claude).