Skip to content

Auto PR Triage: start a new run whenever open source is added - #199508

Closed
soulitzer wants to merge 1 commit into
gh/soulitzer/484/basefrom
gh/soulitzer/484/head
Closed

soulitzer wants to merge 1 commit into
gh/soulitzer/484/basefrom
gh/soulitzer/484/head

Conversation

@soulitzer

@soulitzer soulitzer commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Until now, a PR could be triaged by the label only once. The admission step
counted the PR's open source labeled events and admitted a labeled event
only when the count was exactly 1, so removing and re-adding the label was
skipped as a repeated event. The only way to reevaluate a PR was to rerun all
jobs of its original run by hand.

Now every open source labeled event is admitted. Adding a label needs triage
permission, so a re-add is a deliberate request to triage, which matches the
existing rule that the label, not the ready event, is the authorization. A PR
that already has an outcome label (triaged, bot-triaged, or
bot-triage-error) is still a no-op: intake marks it handled, so the run skips
the LLM and plans nothing. To reevaluate a PR, remove its outcome labels and
remove and re-add open source. That run is a first attempt, so it may mark
the PR as missing an actionable issue again, unlike a manual rerun.

The ready-for-review rule is unchanged: it admits the first ready event after
the latest open source label, so a re-add resets it. A labeled event no
longer depends on the timeline history, so it is admitted even when that
history is truncated; the truncation check now only applies to ready events.

Test Plan:

cd scripts/auto_pr_triage && python -m unittest discover -p 'test_*.py'
actionlint .github/workflows/auto-pr-triage.yml

test_workflow_admits_label_events_and_first_ready_event runs the admission
script against fake timelines; it now expects a second open source label to
be admitted, and a labeled event to be admitted with truncated history.

This PR was authored with an AI assistant (Claude Code).

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/199508

Note: Links to docs will display an error until the docs builds have been completed.

⏳ No Failures, 120 Pending

As of commit bccb028 with merge base 7da85ca (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label Oct 2, 2026
@soulitzer
soulitzer marked this pull request as ready for review October 2, 2026 15:56
@soulitzer
soulitzer requested a review from a team as a code owner October 2, 2026 15:56

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

docs are a bit confusing/not easily understandable but i trust this is correct?

@soulitzer

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -f "lint passed"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

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

cyyever pushed a commit to BakeLab/pytorch that referenced this pull request Oct 11, 2026
…rch#199508)

Until now, a PR could be triaged by the label only once. The admission step
counted the PR's `open source` labeled events and admitted a labeled event
only when the count was exactly 1, so removing and re-adding the label was
skipped as a repeated event. The only way to reevaluate a PR was to rerun all
jobs of its original run by hand.

Now every `open source` labeled event is admitted. Adding a label needs triage
permission, so a re-add is a deliberate request to triage, which matches the
existing rule that the label, not the ready event, is the authorization. A PR
that already has an outcome label (`triaged`, `bot-triaged`, or
`bot-triage-error`) is still a no-op: intake marks it handled, so the run skips
the LLM and plans nothing. To reevaluate a PR, remove its outcome labels and
remove and re-add `open source`. That run is a first attempt, so it may mark
the PR as missing an actionable issue again, unlike a manual rerun.

The ready-for-review rule is unchanged: it admits the first ready event after
the latest `open source` label, so a re-add resets it. A labeled event no
longer depends on the timeline history, so it is admitted even when that
history is truncated; the truncation check now only applies to ready events.

Test Plan:

```
cd scripts/auto_pr_triage && python -m unittest discover -p 'test_*.py'
actionlint .github/workflows/auto-pr-triage.yml
```

test_workflow_admits_label_events_and_first_ready_event runs the admission
script against fake timelines; it now expects a second `open source` label to
be admitted, and a labeled event to be admitted with truncated history.

This PR was authored with an AI assistant (Claude Code).
Pull Request resolved: pytorch#199508
Approved by: https://github.com/janeyx99
ghstack dependencies: pytorch#199428, pytorch#199507
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants