triage: history-based @-mention routing replaces scope-default#150
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the existing scope-based @-mention routing in
security-issue-triagewith 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:selfontask_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
/security-issue-triageagainst airflow-s#406 and confirm the routing produces @amoghrajesh as the docs: tighten Airflow references to placeholders across framework files #1 pick (gh search of apache/airflow PRs touchingairflow_core/.../execution_api/security.pyreturns PR #66071 as the most recent security-context match).airflow/api_fastapi/execution_api/produce the same @-mention set, computed once.🤖 Generated with Claude Code