Repository navigation
[pr-review] Anchor findings on a deleted file's removed lines - #202456
izaitsevfb wants to merge 8 commits into
Conversation
A PR that only deletes files had no line a finding could anchor on, so the sanitizer refused every blocking review of it. parse_diff now records a deleted file's removed lines, and post_review posts findings on removed files on the diff's left side.
PR Status: Approved 🚀Please fix all CI failures and trigger merge by commenting "@pytorchbot merge". ✅ AUTOMATED REVIEW - OUTDATED (earlier commit) - Ready for human review:
Reviewed commit: 🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/202456
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 04d98a9 with merge base 609ff97 ( 🟡 GREEN LIGHT - OUTDATED (earlier commit) - PR requires human review:
reason: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…ed paths with_removed re-raises OutOfTime like the other GitHub calls, and a test covers a deleted path that neutralize_path escapes. (--no-verify: the only lint failure is the pre-existing CODEOWNERS taxonomy error on main.)
Withdrawn: the automated review of bd0d370 found nothing blocking.
There was a problem hiding this comment.
Automated review of c70c22e: nothing blocking; ready for human review.
The PR lets findings on files the PR deletes reach the review: parse_diff records a deleted file's removed lines, and post_review posts those findings on the diff's LEFT side. The review found no issues at HEAD, and the earlier non-blocking findings are resolved or accepted. Recommendation: Approve.
This review is AI-generated and advisory. Each new automated review replaces the previous one.
|
Heads-up for when this and #202455 both land: the merged Stage B prompt contradicts itself. #202455 lists "a deletion" among files with no anchorable line ("anchor it to the most relevant changed line"), while this PR says a deleted file's Since #202455 is the older one, could this PR drop "a deletion" from that list and from (Comment drafted by Claude Code on behalf of the reviewer.) |
#202455 listed a deletion among files with no line to anchor on; this PR anchors deleted files on their old lines, so the list now says a file with no added, removed or context line.
|
✴️ iz2: merging at Ivan's request. |
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 |
|
The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command |
|
✴️ iz2: re-issuing the merge at Ivan's request; the previous merge job hit the 6-hour limit while waiting on macOS shards, which are now green. |
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 |
Merge failedReason: Command Details for Dev Infra teamRaised by workflow job |
…deleted-files # Conflicts: # scripts/pr_review/post_review.py
|
✴️ iz2: merging at Ivan's request after resolving the conflict with #202436. |
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 |
…h#202456) ✴️ iz2: A PR that only deletes files has no new-side line, so the sanitizer discarded every finding and refused any blocking review. pytorch#202328 (removes three workflows) was rejected on all 4 automated runs and never got a review. - `extract_verdict.parse_diff` records a deleted file's removed lines, numbered as in the deleted file. Each finding must still point at a line the diff touches. A type change, where the path still exists, keeps only its new side. - `post_review` lists the PR's files and posts findings on `removed` files on the diff's LEFT side. In the review body they link to the diff line, since the file has no blob at the head. It matches earlier discussions on the same side only. - The Stage B prompt says how to number lines in a deleted file, and no longer lists a deletion among files with no anchorable line (added by pytorch#202455). Known limits: the review row's findings carry no side, so a deleted file's `line` is its pre-deletion number (noted in `emit_row.py`; Dr.CI shows `path:line` as plain text). If the file list can't be read or GitHub disagrees with git on a rename, the comment goes RIGHT, GitHub refuses the review's inline comments, and all of them land in the body. This complements pytorch#202455, which covers findings on renamed-only files in PRs that change other files. Part of pytorch/test-infra#9260. No ClickHouse query changes. Test plan: `python3 -m unittest discover -s scripts/pr_review -t .` passes. The new tests fail against main. Pull Request resolved: pytorch#202456 Approved by: https://github.com/huydhn
…h#202456) ✴️ iz2: A PR that only deletes files has no new-side line, so the sanitizer discarded every finding and refused any blocking review. pytorch#202328 (removes three workflows) was rejected on all 4 automated runs and never got a review. - `extract_verdict.parse_diff` records a deleted file's removed lines, numbered as in the deleted file. Each finding must still point at a line the diff touches. A type change, where the path still exists, keeps only its new side. - `post_review` lists the PR's files and posts findings on `removed` files on the diff's LEFT side. In the review body they link to the diff line, since the file has no blob at the head. It matches earlier discussions on the same side only. - The Stage B prompt says how to number lines in a deleted file, and no longer lists a deletion among files with no anchorable line (added by pytorch#202455). Known limits: the review row's findings carry no side, so a deleted file's `line` is its pre-deletion number (noted in `emit_row.py`; Dr.CI shows `path:line` as plain text). If the file list can't be read or GitHub disagrees with git on a rename, the comment goes RIGHT, GitHub refuses the review's inline comments, and all of them land in the body. This complements pytorch#202455, which covers findings on renamed-only files in PRs that change other files. Part of pytorch/test-infra#9260. No ClickHouse query changes. Test plan: `python3 -m unittest discover -s scripts/pr_review -t .` passes. The new tests fail against main. Pull Request resolved: pytorch#202456 Approved by: https://github.com/huydhn
✴️ iz2: A PR that only deletes files has no new-side line, so the sanitizer discarded every finding and refused any blocking review. #202328 (removes three workflows) was rejected on all 4 automated runs and never got a review.
extract_verdict.parse_diffrecords a deleted file's removed lines, numbered as in the deleted file. Each finding must still point at a line the diff touches. A type change, where the path still exists, keeps only its new side.post_reviewlists the PR's files and posts findings onremovedfiles on the diff's LEFT side. In the review body they link to the diff line, since the file has no blob at the head. It matches earlier discussions on the same side only.Known limits: the review row's findings carry no side, so a deleted file's
lineis its pre-deletion number (noted inemit_row.py; Dr.CI showspath:lineas plain text). If the file list can't be read or GitHub disagrees with git on a rename, the comment goes RIGHT, GitHub refuses the review's inline comments, and all of them land in the body.This complements #202455, which covers findings on renamed-only files in PRs that change other files. Part of pytorch/test-infra#9260.
No ClickHouse query changes.
Test plan:
python3 -m unittest discover -s scripts/pr_review -t .passes. The new tests fail against main.