Repository navigation
Conversation
[ghstack-poisoned]
PR Status: in progressA maintainer requested changes. Please address their feedback before the PR returns to maintainer review. To become ready for review, the change must pass automated review and every maintainer comment must be addressed, either with a code change or a reply explaining why no change is needed. A fresh automated review checks that the feedback has been addressed. All CI must finish and Dr. CI must classify every failure as unrelated to your PR. Fix the failures it attributes to your PR (see status below in this comment). Workflows waiting for a maintainer to approve their run do not block this. To minimize iteration time, feel free to run the pr-review skill from the repo locally. If you address comments without pushing, comment 🟡 AUTOMATED REVIEW - Changes requested:
Findings (11): Reviewed commit: 🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/202981
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit f03a181 with merge base 78def3c ( 🟡 GREEN LIGHT - OUTDATED (earlier commit) - PR requires human review:
reason: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
[ghstack-poisoned]
## Human Note Let agents suggest duplicate issues ## Agent Notes Let triage propose an ordinary same-repository issue as a possible duplicate after reading its body and relevant comments. The trusted apply step posts a fixed link asking the reporter to confirm the match and close their own issue only if appropriate. The bot keeps the source issue open and never writes to the candidate. The plan supplies an issue number, not a URL or comment. Source and target are validated again before writes; invalid targets and conflicting close/umbrella annotations fall back to review. A bot-authored target marker suppresses repeated suggestions on retries. Catalog umbrella link/close rules remain separate. ### Test Plan ```sh PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s scripts/issue_triage_pi -v git diff --check ``` 119 Python tests pass, including 11 new suggestion tests. The initial comment test and a closed-source skip-fallback regression failed before their fixes and pass afterward. ## Validation [Pinned-runtime ciforge CI](https://github.com/pytorch/ciforge/actions/runs/41379809233) passed 119 Python tests and 4 search-tool tests with Pi 0.99.1. [Read-only ciforge replay](https://github.com/pytorch/ciforge/actions/runs/41379809226) searched and read #200935's body/comments, then proposed it as a possible duplicate of #202764 with no automatic closure. The related-only case stayed open, and the two umbrella controls retained their close/link proposals. Apply was skipped; no comments or issue changes were posted. The positive candidate's comments explicitly confirmed the duplicate relationship, so this is current-context integration evidence, not a blind accuracy benchmark. The related-only case had empty search results. Real-write behavior for this new suggestion path has not been exercised in ciforge; source-only writes and retries are covered by the local tests. ## Linked issue or supporting maintainer Triage-tooling follow-up; #202764 and #200935 were used as a confirmed duplicate replay case. ## BC-breaking? No public PyTorch API change. ## Summary (human written only) ## Agent details (if applicable) AI-assisted implementation and validation are described in Agent Notes above. ghstack-source-id: 157ed1b Pull-Request: #202981
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[ghstack-poisoned]
## Human Note Let agents suggest duplicate issues ## Agent Notes Let triage propose an ordinary same-repository issue as a possible duplicate after reading its body and relevant comments. The trusted apply step posts a fixed link asking the reporter to confirm the match and close their own issue only if appropriate. The bot keeps the source issue open and never writes to the candidate. The plan supplies an issue number, not a URL or comment. Source and target are validated again before writes; invalid targets and conflicting close/umbrella annotations fall back to review. A bot-authored target marker suppresses repeated suggestions on retries. Catalog umbrella link/close rules remain separate. ### Test Plan ```sh PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s scripts/issue_triage_pi -v git diff --check ``` 119 Python tests pass, including 11 new suggestion tests. The initial comment test and a closed-source skip-fallback regression failed before their fixes and pass afterward. ## Validation [Pinned-runtime ciforge CI](https://github.com/pytorch/ciforge/actions/runs/41379809233) passed 119 Python tests and 4 search-tool tests with Pi 0.99.1. [Read-only ciforge replay](https://github.com/pytorch/ciforge/actions/runs/41379809226) searched and read #200935's body/comments, then proposed it as a possible duplicate of #202764 with no automatic closure. The related-only case stayed open, and the two umbrella controls retained their close/link proposals. Apply was skipped; no comments or issue changes were posted. The positive candidate's comments explicitly confirmed the duplicate relationship, so this is current-context integration evidence, not a blind accuracy benchmark. The related-only case had empty search results. Real-write behavior for this new suggestion path has not been exercised in ciforge; source-only writes and retries are covered by the local tests. ## Linked issue or supporting maintainer Triage-tooling follow-up; #202764 and #200935 were used as a confirmed duplicate replay case. ## BC-breaking? No public PyTorch API change. ## Summary (human written only) ## Agent details (if applicable) AI-assisted implementation and validation are described in Agent Notes above. ghstack-source-id: 247bfb4 Pull-Request: #202981
[ghstack-poisoned]
## Human Note Let agents suggest duplicate issues ## Agent Notes Let triage propose an ordinary same-repository issue as a possible duplicate after reading its body and relevant comments. The trusted apply step posts a fixed link asking the reporter to confirm the match and close their own issue only if appropriate. The bot keeps the source issue open and never writes to the candidate. The plan supplies an issue number, not a URL or comment. Source and target are validated again before writes; invalid targets and conflicting close/umbrella annotations fall back to review. A bot-authored target marker suppresses repeated suggestions on retries. Catalog umbrella link/close rules remain separate. ### Test Plan ```sh PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s scripts/issue_triage_pi -v git diff --check ``` 119 Python tests pass, including 11 new suggestion tests. The initial comment test and a closed-source skip-fallback regression failed before their fixes and pass afterward. ## Validation [Pinned-runtime ciforge CI](https://github.com/pytorch/ciforge/actions/runs/41379809233) passed 119 Python tests and 4 search-tool tests with Pi 0.99.1. [Read-only ciforge replay](https://github.com/pytorch/ciforge/actions/runs/41379809226) searched and read #200935's body/comments, then proposed it as a possible duplicate of #202764 with no automatic closure. The related-only case stayed open, and the two umbrella controls retained their close/link proposals. Apply was skipped; no comments or issue changes were posted. The positive candidate's comments explicitly confirmed the duplicate relationship, so this is current-context integration evidence, not a blind accuracy benchmark. The related-only case had empty search results. Real-write behavior for this new suggestion path has not been exercised in ciforge; source-only writes and retries are covered by the local tests. ## Linked issue or supporting maintainer Triage-tooling follow-up; #202764 and #200935 were used as a confirmed duplicate replay case. ## BC-breaking? No public PyTorch API change. ## Summary (human written only) ## Agent details (if applicable) AI-assisted implementation and validation are described in Agent Notes above. ghstack-source-id: 7729c35 Pull-Request: #202981
[ghstack-poisoned]
## Human Note Let agents suggest duplicate issues ## Agent Notes Let triage propose an ordinary same-repository issue as a possible duplicate after reading its body and relevant comments. The trusted apply step posts a fixed link asking the reporter to confirm the match and close their own issue only if appropriate. The bot keeps the source issue open and never writes to the candidate. The plan supplies an issue number, not a URL or comment. Source and target are validated again before writes; invalid targets and conflicting close/umbrella annotations fall back to review. A bot-authored target marker suppresses repeated suggestions on retries. Catalog umbrella link/close rules remain separate. ### Test Plan ```sh PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s scripts/issue_triage_pi -v git diff --check ``` 119 Python tests pass, including 11 new suggestion tests. The initial comment test and a closed-source skip-fallback regression failed before their fixes and pass afterward. ## Validation [Pinned-runtime ciforge CI](https://github.com/pytorch/ciforge/actions/runs/41379809233) passed 119 Python tests and 4 search-tool tests with Pi 0.99.1. [Read-only ciforge replay](https://github.com/pytorch/ciforge/actions/runs/41379809226) searched and read #200935's body/comments, then proposed it as a possible duplicate of #202764 with no automatic closure. The related-only case stayed open, and the two umbrella controls retained their close/link proposals. Apply was skipped; no comments or issue changes were posted. The positive candidate's comments explicitly confirmed the duplicate relationship, so this is current-context integration evidence, not a blind accuracy benchmark. The related-only case had empty search results. Real-write behavior for this new suggestion path has not been exercised in ciforge; source-only writes and retries are covered by the local tests. ## Linked issue or supporting maintainer Triage-tooling follow-up; #202764 and #200935 were used as a confirmed duplicate replay case. ## BC-breaking? No public PyTorch API change. ## Summary (human written only) ## Agent details (if applicable) AI-assisted implementation and validation are described in Agent Notes above. ghstack-source-id: e9b76fa Pull-Request: #202981
There was a problem hiding this comment.
Automated review of f03a181: changes requested before human review.
This PR adds an optional possible_duplicate field to the issue-triage plan; the trusted apply step then posts a fixed comment on the source issue suggesting the linked issue, and the source stays open. Recommendation: Request Changes. The bot can send a reporter to a dead, locked or attacker-chosen target, decision handling differs from the umbrella path, and a source closed before apply fails the job without the tests noticing; the three blocking findings from the earlier automated review are still unaddressed at HEAD.
🔴 5 blocking findings are attached to the code below.
⚪ 6 non-blocking findings
pytorch/scripts/issue_triage_pi/apply_plan.py
Line 428 in f03a181
Backward compatibility: moving the source-open check changes existing umbrella plans. The related-issue source check now runs before the skip_already_routed branch; the old umbrella check ran after it. Before, an umbrella + skip_already_routed plan on a PR or foreign source got triage review and bot-triaged. Now it gets no writes, the outcome is no_action, and main() exits 1. On a closed source it also gets no writes, with outcome closed. The change may be intended, but the PR description doesn't mention it and no test in test_umbrella_plan.py covers it. Add an umbrella case and note the change in the description.
pytorch/scripts/issue_triage_pi/apply_plan.py
Line 244 in f03a181
A rejected target leaves no trace in the step summary. effects.possible_duplicate is only set on success, and neither rejection note (:226-228, :240-242) names the proposed number. The umbrella path records umbrella_issue before validating and always prints **Umbrella:** **Target:** (:313-316, 731-737). Record the proposed number, or print a **Possible duplicate:** #N (rejected) line.
pytorch/scripts/issue_triage_pi/apply_plan.py
Line 231 in f03a181
Redundant validation and duplicated fetch helpers. The number checks at :231-233 repeat fetch_possible_duplicate (:208) and can't be reached through main() or current_reference_effects, because target is already None and :234 rejects first. fetch_possible_duplicate (:206-213) is also a near copy of fetch_umbrella_target (:190-203). Drop the duplicate checks and share one fetch_related_issue(repo, number) helper.
The fake API is weaker than the umbrella fake. Paginated and non-paginated comment reads both return every comment as one page, so dropping all_comments=True at apply_plan.py:622 or :774 would fail no test; test_umbrella_plan.py:64-67 splits comments across pages to catch this. Target reads also ignore the retry kwarg, so the retry=False at apply_plan.py:211 is untested; the umbrella fake rejects retry=True (test_umbrella_plan.py:71-74).
Missing coverage, and assertions that can't fail. The success test only checks len(api.writes) == 2, never which labels are added; triaged is added (apply_plan.py:551-559) while the bot asks the reporter to confirm, and nothing pins that down either way. Nothing covers triage_review with a valid target, redirect_oncall, request_info, request_reproduction, or label with a non-pt2 oncall label. No test sets state_reason or locked, and the issue() helper can't produce them; the state="unknown" subcase uses a value GitHub never returns. test_closed_candidate_can_be_suggested_without_mutating_it asserts the disputed behaviour as correct. In test_invalid_or_catalog_targets_never_get_duplicate_suggestions, five of the seven values are rejected in fetch_possible_duplicate and never reach a target read, so only the two catalog numbers test target validation. Assertions on api.target\["state"\] and api.source\["state"\] == "closed" can never fail: the fake never changes the target and closes the source on its own.
PlanSchemaTest (test_apply_plan.py:300-315) doesn't cover the new field. The schema sets additionalProperties: false, and the new tests write plan JSON without validating it, so renaming possible_duplicate on either side would silently disable the feature. (umbrella was never covered either, so this gap predates the PR.) Assert the schema's possible_duplicate entry (integer, minimum 1) in PlanSchemaTest.
Please address the findings and push; a new commit normally gets a fresh automated review.
This review is AI-generated and advisory. Each new automated review replaces the previous one.
| "possible duplicate conflicts with the decision; kept open for review" | ||
| ) | ||
| return "", False | ||
| if ( |
There was a problem hiding this comment.
🔴 Security: nothing trusted limits which issue the target can be. The model picks the target after reading untrusted issue bodies and comments, and apply accepts any open or closed same-repo issue that isn't in the catalog. It never checks created_at against the source, locked, or the target author's author_association. Attack: someone files a look-alike issue whose text steers the model, and the bot then tells a real reporter, with its own authority, to move their repro details there and close theirs. The attacker controls that thread and can edit it later, and download-link redaction only applies to the source body. The umbrella path is safe because its targets must be in the checked-in umbrellas.json. The PR's argument that "the model supplies neither a URL nor free-form comment text" doesn't cover this. Fix: at minimum, require the target to predate the source and be unlocked. Consider also requiring a maintainer-associated author or existing triage labels on the target. Document the remaining risk in .github/actions/pi-agent/README.md:127-131.
| or not isinstance(target, dict) | ||
| or type(target.get("number")) is not int | ||
| or not is_repo_issue(target, repo, number) | ||
| or target.get("state") not in ("open", "closed") |
There was a problem hiding this comment.
🔴 The target-state check never rejects anything, and the fixed wording is wrong for most targets. GitHub only returns open/closed, so target.get("state") not in ("open", "closed") does nothing, and state_reason/locked are never read. The model can't avoid bad targets either, because get_issue/search_issues in github-issue-tools.ts:83-93,147-152 don't expose them, so SKILL.md:112 can't be followed reliably. Every target gets "add any new reproduction details there and close this issue still reproduces after the linked issue's fix". For a not_planned/duplicate target, the reporter is asked to close their only live report for a thread nobody watches, the very "silently discard" outcome the PR says it avoids. A locked target can't take new details, and an open target has no fix yet. umbrella_comment requires state == "open" (:330). Fix: reject not_planned, duplicate and locked targets, and choose the wording by target state. For a target closed as completed, ask the reporter to confirm on their own issue rather than close it. Also replace and with ASCII to match templates.json.
| effects: Effects, | ||
| ) -> tuple[str, bool]: | ||
| number = plan["possible_duplicate"] | ||
| if "umbrella" in plan or plan["decision"] not in ("label", "triage_review"): |
There was a problem hiding this comment.
🔴 Decisions other than label/triage_review are handled differently from the umbrella path (:317-322, 342-353). With redirect_oncall, the plan is rejected and triage review is added (:501-502), so the issue gets both oncall: X and triage review and sits in two queues, while the umbrella path skips quietly. A decision: "label" plan with a non-pt2 oncall label (e.g. oncall: distributed) passes the check, because possible_duplicate_comment never receives the label set, so the suggestion is posted on an issue being routed to another team. request_info/request_reproduction are escalated to review, while the umbrella path posts a link only. None of this escalation is documented in the schema description (issue-triage-plan.json:53), SKILL.md:62 or README:127-131. Fix: apply the umbrella's oncall rule (skip quietly on redirect_oncall or any non-pt2 oncall: label), and either allow the suggestion on info/reproduction requests or document the escalation.
| issue=args.issue, | ||
| source={**issue, "state": "open"} if args.replay else issue, | ||
| umbrella_target=fetch_umbrella_target(args.repo, args.issue, plan), | ||
| duplicate_target=fetch_possible_duplicate(args.repo, args.issue, plan), |
There was a problem hiding this comment.
🔴 A source closed before apply fails the job. current_reference_effects sees the closed source and returns empty effects, but state_after (:808-810) still uses the stale "open" state from main()'s first read. The outcome is then no_action and main() returns 1 (:824-826). The apply step (issue-triage-pi.yml:209-213) runs under the default bash -e with no || rc, so the job fails and the distributed hand-off at :216-222 is skipped. Non-skip umbrella plans already had this race; this PR extends it to possible_duplicate and to skip + related-issue plans. test_skip_fallback_does_not_mutate_a_source_closed_before_apply exercises exactly this case and passes only because the test ignores the return value. Fix: take state_after from the rechecked source.
| patch("apply_plan.publish") as publish, | ||
| patch("sys.stdout", new_callable=StringIO), | ||
| ): | ||
| apply_plan.main() |
There was a problem hiding this comment.
🔴 run_plan ignores main()'s return value, while test_umbrella_plan.py:152 asserts apply_plan.main() == 0. Three runs end in no_action, which exits 1 and would fail the workflow, yet the tests pass: the PR-source and foreign-source subcases of test_source_and_target_are_revalidated_before_writes, and test_skip_fallback_does_not_mutate_a_source_closed_before_apply. Assert the exit code.
|
@pytorchbot merge -f |
|
❌ 🤖 pytorchbot command failed: Try |
|
@pytorchbot merge -f "Bypass advisory automated reviews; human reviewers approved the stack" |
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 |
…ytorch#202981) ## Human Note Let agents suggest duplicate issues ## Agent Notes ### Why Finding a likely duplicate should help the reporter, not silently discard their report. Add a suggestion-only path for ordinary issues: explain the possible match, ask the reporter to check it, and leave the final decision to them. This is separate from approved umbrella closure policies. ### What happens After reading a candidate's body and relevant comments, the model can propose `possible_duplicate: <issue number>`. The trusted apply step validates the reference and posts fixed copy linking that issue. It keeps the source open and never writes to the candidate, which may already be open or closed. ```mermaid flowchart TD M["Model reads candidate and proposes possible_duplicate"] --> V{"Source, target and plan are eligible?"} V -->|No| R["No duplicate suggestion; skip or flag review"] V -->|Yes| B{"Matching bot suggestion already posted?"} B -->|Yes| N["Do not repeat the comment"] B -->|No| C["Post fixed linked suggestion"] N --> O["Keep source open; finish any pending labels"] C --> O O --> H["Reporter can confirm the match or explain the difference"] ``` | Scenario | Outcome | | --- | --- | | Plausible same underlying bug, with candidate context read | Suggest the linked issue and ask the reporter to confirm. No automatic closure. | | Similar operator/title, or a report that still reproduces after the candidate's fix | Do not infer a duplicate; keep investigating the new report. | | Self-reference, foreign/PR/unavailable target, catalog umbrella, or conflicting close/umbrella annotation | No ordinary duplicate suggestion; skip or route to review. | | Retry after comment succeeded but label writing failed | Do not repost; finish the pending labels. | The comment asks reporters to move any new reproduction details to the linked issue and close their own issue **only if it is the same problem**. Otherwise they can explain what differs. The model supplies neither a URL nor free-form comment text; same-repository links and the wording are constructed by trusted code. Semantic matching still depends on the model and human judgment. ### Test Plan ```sh PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s scripts/issue_triage_pi -v git diff --check ``` 106 Python tests pass, including 11 new suggestion tests. The initial comment test and a closed-source skip-fallback regression failed before their fixes and pass afterward. [Current PyTorch PR test job](https://github.com/pytorch/pytorch/actions/runs/41384204576/job/125081314456). The Python suite also runs in triage preparation, before the model. ## Validation Before test consolidation, [pinned-runtime ciforge CI](https://github.com/pytorch/ciforge/actions/runs/41379809233) passed 119 Python tests and 4 search-tool tests with Pi 0.99.1. [Read-only ciforge replay](https://github.com/pytorch/ciforge/actions/runs/41379809226) searched and read pytorch#200935's body/comments, then proposed it as a possible duplicate of pytorch#202764 with no automatic closure. The related-only case stayed open, and the two umbrella controls retained their close/link proposals. Apply was skipped; no comments or issue changes were posted. The positive candidate's comments explicitly confirmed the duplicate relationship, so this is current-context integration evidence, not a blind accuracy benchmark. The related-only case had empty search results. Real-write behavior for this new suggestion path has not been exercised in ciforge; source-only writes and retries are covered by the local tests. ## Linked issue or supporting maintainer Triage-tooling follow-up; pytorch#202764 and pytorch#200935 were used as a confirmed duplicate replay case. ## BC-breaking? No public PyTorch API change. ## Summary (human written only) ## Agent details (if applicable) AI-assisted implementation and validation are described in Agent Notes above. Pull Request resolved: pytorch#202981 Approved by: https://github.com/ezyang, https://github.com/malfet ghstack dependencies: pytorch#203124, pytorch#202961, pytorch#202962
…ytorch#202981) ## Human Note Let agents suggest duplicate issues ## Agent Notes ### Why Finding a likely duplicate should help the reporter, not silently discard their report. Add a suggestion-only path for ordinary issues: explain the possible match, ask the reporter to check it, and leave the final decision to them. This is separate from approved umbrella closure policies. ### What happens After reading a candidate's body and relevant comments, the model can propose `possible_duplicate: <issue number>`. The trusted apply step validates the reference and posts fixed copy linking that issue. It keeps the source open and never writes to the candidate, which may already be open or closed. ```mermaid flowchart TD M["Model reads candidate and proposes possible_duplicate"] --> V{"Source, target and plan are eligible?"} V -->|No| R["No duplicate suggestion; skip or flag review"] V -->|Yes| B{"Matching bot suggestion already posted?"} B -->|Yes| N["Do not repeat the comment"] B -->|No| C["Post fixed linked suggestion"] N --> O["Keep source open; finish any pending labels"] C --> O O --> H["Reporter can confirm the match or explain the difference"] ``` | Scenario | Outcome | | --- | --- | | Plausible same underlying bug, with candidate context read | Suggest the linked issue and ask the reporter to confirm. No automatic closure. | | Similar operator/title, or a report that still reproduces after the candidate's fix | Do not infer a duplicate; keep investigating the new report. | | Self-reference, foreign/PR/unavailable target, catalog umbrella, or conflicting close/umbrella annotation | No ordinary duplicate suggestion; skip or route to review. | | Retry after comment succeeded but label writing failed | Do not repost; finish the pending labels. | The comment asks reporters to move any new reproduction details to the linked issue and close their own issue **only if it is the same problem**. Otherwise they can explain what differs. The model supplies neither a URL nor free-form comment text; same-repository links and the wording are constructed by trusted code. Semantic matching still depends on the model and human judgment. ### Test Plan ```sh PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s scripts/issue_triage_pi -v git diff --check ``` 106 Python tests pass, including 11 new suggestion tests. The initial comment test and a closed-source skip-fallback regression failed before their fixes and pass afterward. [Current PyTorch PR test job](https://github.com/pytorch/pytorch/actions/runs/41384204576/job/125081314456). The Python suite also runs in triage preparation, before the model. ## Validation Before test consolidation, [pinned-runtime ciforge CI](https://github.com/pytorch/ciforge/actions/runs/41379809233) passed 119 Python tests and 4 search-tool tests with Pi 0.99.1. [Read-only ciforge replay](https://github.com/pytorch/ciforge/actions/runs/41379809226) searched and read pytorch#200935's body/comments, then proposed it as a possible duplicate of pytorch#202764 with no automatic closure. The related-only case stayed open, and the two umbrella controls retained their close/link proposals. Apply was skipped; no comments or issue changes were posted. The positive candidate's comments explicitly confirmed the duplicate relationship, so this is current-context integration evidence, not a blind accuracy benchmark. The related-only case had empty search results. Real-write behavior for this new suggestion path has not been exercised in ciforge; source-only writes and retries are covered by the local tests. ## Linked issue or supporting maintainer Triage-tooling follow-up; pytorch#202764 and pytorch#200935 were used as a confirmed duplicate replay case. ## BC-breaking? No public PyTorch API change. ## Summary (human written only) ## Agent details (if applicable) AI-assisted implementation and validation are described in Agent Notes above. Pull Request resolved: pytorch#202981 Approved by: https://github.com/ezyang, https://github.com/malfet ghstack dependencies: pytorch#203124, pytorch#202961, pytorch#202962
Stack from ghstack (oldest at bottom):
Human Note
Let agents suggest duplicate issues
Agent Notes
Why
Finding a likely duplicate should help the reporter, not silently discard their report. Add a
suggestion-only path for ordinary issues: explain the possible match, ask the reporter to check it,
and leave the final decision to them. This is separate from approved umbrella closure policies.
What happens
After reading a candidate's body and relevant comments, the model can propose
possible_duplicate: <issue number>. The trusted apply step validates the reference and posts fixedcopy linking that issue. It keeps the source open and never writes to the candidate, which may
already be open or closed.
flowchart TD M["Model reads candidate and proposes possible_duplicate"] --> V{"Source, target and plan are eligible?"} V -->|No| R["No duplicate suggestion; skip or flag review"] V -->|Yes| B{"Matching bot suggestion already posted?"} B -->|Yes| N["Do not repeat the comment"] B -->|No| C["Post fixed linked suggestion"] N --> O["Keep source open; finish any pending labels"] C --> O O --> H["Reporter can confirm the match or explain the difference"]The comment asks reporters to move any new reproduction details to the linked issue and close
their own issue only if it is the same problem. Otherwise they can explain what differs. The
model supplies neither a URL nor free-form comment text; same-repository links and the wording are
constructed by trusted code. Semantic matching still depends on the model and human judgment.
Test Plan
106 Python tests pass, including 11 new suggestion tests. The initial comment test and a closed-source skip-fallback regression failed before their fixes and pass afterward.
Current PyTorch PR test job. The Python suite also runs in triage preparation, before the model.
Validation
Before test consolidation, pinned-runtime ciforge CI passed 119 Python tests and 4 search-tool tests with Pi 0.99.1.
Read-only ciforge replay searched and read #200935's body/comments, then proposed it as a possible duplicate of #202764 with no automatic closure. The related-only case stayed open, and the two umbrella controls retained their close/link proposals. Apply was skipped; no comments or issue changes were posted.
The positive candidate's comments explicitly confirmed the duplicate relationship, so this is current-context integration evidence, not a blind accuracy benchmark. The related-only case had empty search results. Real-write behavior for this new suggestion path has not been exercised in ciforge; source-only writes and retries are covered by the local tests.
Linked issue or supporting maintainer
Triage-tooling follow-up; #202764 and #200935 were used as a confirmed duplicate replay case.
BC-breaking?
No public PyTorch API change.
Summary (human written only)
Agent details (if applicable)
AI-assisted implementation and validation are described in Agent Notes above.