Skip to content

triage: history-based @-mention routing replaces scope-default#150

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:triage-history-mentions
May 14, 2026
Merged

triage: history-based @-mention routing replaces scope-default#150
potiuk merged 1 commit into
apache:mainfrom
potiuk:triage-history-mentions

Conversation

@potiuk

@potiuk potiuk commented May 14, 2026

Copy link
Copy Markdown
Member

Summary

Replaces the existing scope-based @-mention routing in security-issue-triage with a history-based priority order: PR-author of the analogous prior fix → recent reviewer of the area → scope-default fallback. Caches the routing decision per code area within a bulk-mode run.

Motivation

Scope-default routing produces generic 3-person pings that the team trains itself to ignore. For airflow-s#406 (the missing ti:self on task_reschedules), the right pick was unambiguous — @amoghrajesh wrote apache/airflow#66071 introducing the mechanism, so they have the deepest context — but the scope-default rule produced a 3-person generic-providers ping. This PR codifies the priority order so the classifier reaches the same answer the human triager reaches by hand.

Test plan

🤖 Generated with Claude Code

Replaces the existing scope-based @-mention routing in
security-issue-triage with a history-based priority order:

  1. PR-author of the analogous prior fix (via gh search prs)
  2. Recent reviewer of the area (via gh pr list reviewed-by)
  3. Scope-default fallback (existing behavior, narrowed to 1 pick)

The routing decision is cached per unique code area within a
bulk-mode run so a 5-tracker sweep through one directory issues
one set of gh search prs queries, not five.

Adds an explicit routing-failure fallback: when no PR-history
match exists for a code area, the skill stops and surfaces a
"confirm @-mentions before posting" prompt rather than silently
defaulting to a generic roster ping.

Motivation: scope-default routing produces generic 3-person pings
that the team trains itself to ignore. For airflow-s#406 (missing
ti:self enforcement on /execution/task-reschedules) the right
pick was unambiguous — @amoghrajesh wrote apache/airflow#66071
introducing the mechanism — but the existing scope-default rule
produced a generic providers ping. This PR codifies the priority
order so the classifier reaches the same answer the human triager
reaches by hand.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@potiuk potiuk merged commit a8c9eab into apache:main May 14, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant