Skip to content

[pr-review] Separate blocking from non-blocking findings - #203531

Closed
bbayeste wants to merge 3 commits into
gh/bbayeste/10/basefrom
gh/bbayeste/10/head
Closed

bbayeste wants to merge 3 commits into
gh/bbayeste/10/basefrom
gh/bbayeste/10/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

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-poisoned]
@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label Nov 5, 2026
@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:

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.

Findings (3):

[minor] .agents/skills/pr-review/SKILL.md:122
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**".

[minor] .agents/skills/pr-review/SKILL.md:271
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.

[minor] scripts/pr_review/test_workflow_contract.py:5747
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.

Reviewed commit: dad10dd

Review run

🐛 Report a bad review

🔗 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 Failures

As of commit dad10dd 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.

@bbayeste
bbayeste marked this pull request as ready for review November 5, 2026 06:00
@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.

@albanD albanD left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the data! Sounds like a good move!
The nits from bot would be good to fix.

[ghstack-poisoned]
bbayeste added a commit that referenced this pull request Nov 5, 2026
## 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
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

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.

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.

This has some overlapping with #203308, let's coordinate with @izaitsevfb

@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 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

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.

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".


Recommend **Request Changes** only for a blocking point. Recommend **Needs Discussion** when the decision depends on maintainers rather than on a fix: an open design question, or a potentially breaking change (bc-guidelines.md). Otherwise, with only non-blocking points, recommend **Approve**; those points stay in their own sections. The Time Budget's rules for early posts come first. An unaddressed maintainer comment always means **Request Changes**.

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.


self.assertIn("A point the review labels non-blocking is `minor`", prompt)

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

@github-actions
github-actions Bot dismissed stale reviews from themself November 5, 2026 16:39

Withdrawn: the automated review of dad10dd found nothing blocking.

@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

dominikjastrzebskix pushed a commit to dominikjastrzebskix/pytorch that referenced this pull request Nov 9, 2026
)

## 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
pytorchmergebot pushed a commit that referenced this pull request Nov 25, 2026
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
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 in progress PR is being worked on by the author, until the automated review accepts it Merged topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants