Repository navigation
[Experiment] Agentic Triage Workflow - #55244
Conversation
Verbatim copy of microsoft/mxc .github/workflows/issue-triage.md as the starting point for a .NET SDK agentic triage workflow. No modifications yet.
Strip the mxc container/executor label allowlist, the mxc owner logins and area->owner map, and the mxc macOS-backend synonym example. Leave placeholders for the dotnet/sdk labels (commit 2.5) and CODEOWNERS + round-robin owner routing (commits 3-6).
Populate add-labels.allowed with the real dotnet/sdk Area-* component labels and core type labels (Bug/enhancement/Feature Request/question/documentation/Task). Switch the removed lifecycle label from mxc's 'Needs-Triage' to dotnet/sdk's 'untriaged' (the label the policy service auto-adds). Update body guidance to reference Area-* + type labels.
Replace the owner-assignment placeholder with Azure/azure-sdk-for-net's CODEOWNERS owner-lookup and routing sections (their Step 5 + Step 6), copied verbatim with headings demoted to nest under ## Task. Still Azure-specific (ServiceLabel/AzureSdkOwners/ServiceOwners/Service Attention/mention_owners); commit 4 adapts it to how dotnet/sdk CODEOWNERS actually works.
Rewrite the Azure owner-lookup section to match how dotnet/sdk CODEOWNERS works: root-level CODEOWNERS organized into '# Area-<Name>' sections that map directly to Area-* labels, with individual (@login) vs team (@dotnet/team) owners. Assign individuals; route team-only areas via the 'needs team triage' label. Remove all Azure-isms (ServiceLabel/%/AzureSdkOwners/ServiceOwners/Service Attention/needs-team-attention/customer-reported/mention_owners and the Event Hubs/ARM/Mgmt examples).
Insert microsoft/pylance-release's round-robin rotation body verbatim (rotation order, stateful dotnet#4462 pointer, skip-reassign, steps 1-6). Headings demoted to nest under ## Task. Commit 6 makes it stateless and merges it with expertise-based owner routing.
Replace pylance's stateful rotation with a stateless, expertise-first, load-balanced selection: prefer the area's CODEOWNERS individual owner(s), measure each candidate's current open-assigned load via 'repo:... is:open assignee:<login>', and assign the least-loaded; when the SME is overloaded and an alternate owner exists, assign the lighter teammate and name the SME. is:open avoids penalizing tenured members and avoids flooding newer ones. Populate assign-to-user.allowed with the 12 CODEOWNERS individuals and add the 'needs team triage' routing label. No persisted rotation state, no dotnet#4462 pointer, no unassign-from-user.
Teach the triager .NET SDK phrasing -> Area-* mapping (build/restore/publish/pack/test/run/watch/format, MSBuild, NuGet, workloads, templates, trimming/AOT/single-file/R2R, source-build/VMR, SWA/Blazor/Razor). Add special-purpose labels to the allowlist and body guidance: cookie (Copilot-suitable easy issues: small fixes, doc changes, backports, simple tests), Test Debt, performance, dotnetup, breaking-change, good first issue, help wanted, backport. Add a needs-info (needs-more-info) behavior: detect incomplete bug reports, apply needs-info, ask for the specific missing details, and hold owner routing.
Make the description dotnet/sdk-specific; add 'roles: all' so external-contributor issues are processed; switch to 'min-integrity: none' with a justification so external issue content is read (not filtered) while still treated as untrusted data; add github toolsets [issues, labels] and a 'noop' safe output; add a 'Before you start' anti-noise guard (skip already-triaged issues, re-triage after needs-info is answered) and a prompt-injection security note; drop the stale internal commit reference in the label comment.
Add a workflow_dispatch trigger with an issue_number input so the workflow can be run manually against a specific existing issue for testing (in addition to issues opened/edited). Resolve the target issue as github.event.issue.number || github.event.inputs.issue_number, and set target: '*' on the write safe-outputs so a dispatched run acts on the specified issue. Fix compile errors: nest 'roles: all' under 'on:', and drop the fixed add-labels allowlist (dotnet/sdk exceeds the 50-item cap) in favor of an instruction to apply only existing repo labels. Generate issue-triage.lock.yml via 'gh aw compile' and update the pinned actions-lock.json.
The gateway rejected the guard policy with "allow-only.repos string must be all or public" because allowed-repos was a scalar repo string. A specific repo must be a list, so repos compiles to an array the gateway accepts. This is why the agent step failed with nothing listening on 8080 -- the gateway never started.
There was a problem hiding this comment.
Pull request overview
Adds an agentic workflow to triage newly opened/edited issues in dotnet/sdk, applying labels, requesting missing info, and routing/assigning based on CODEOWNERS, backed by a compiled gh-aw lock workflow.
Changes:
- Introduces a gh-aw Issue Triage workflow definition that guides labeling, needs-info handling, and CODEOWNERS-based routing with load balancing.
- Adds the compiled/pinned workflow (
issue-triage.lock.yml) that runs the Copilot-driven triage under the gh-aw harness. - Updates the gh-aw actions lock to the newer
github/gh-aw-actions/setupversion.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
.github/workflows/issue-triage.md |
New gh-aw workflow spec/prompt defining how to triage issues, apply labels, and route to CODEOWNERS owners. |
.github/workflows/issue-triage.lock.yml |
Generated GitHub Actions workflow executing the agentic triage flow with pinned actions/containers and safe-output handling. |
.github/aw/actions-lock.json |
Bumps pinned github/gh-aw-actions/setup action version/SHA used by gh-aw workflows. |
Give the user an opportunity (2 minute window) to edit the issue content before we pull it. This will save on resources as many edits are minor and should not cause a new triage workflow to occur, as this would not be useful.
CODEOWNERS_PAT_0 through _2 would need to exist as secrets containing a token with exclusively organization Members: read and repository Issues: read for this to function. This is scope creep so I will be likely removing this and deferring it to another PR but including here so we have it for future reference to build on top of.
…ing" This reverts commit 7157f3f.
lbussell
left a comment
There was a problem hiding this comment.
Great work on analyzing other workflows and providing in-depth examples of what this workflow looks like when it is run!
Co-authored-by: Logan Bussell <[email protected]>
Area-* is the pattern used across the repo, so we should match that pattern. dotnet#55244 the agentic triage workflow needed specific instructions due to this deviance so I changed it. I admit it's a little more annoying since the typing doesn't come up as dotnetup immediately but think this is the right call.
| @@ -0,0 +1,369 @@ | |||
| --- | |||
There was a problem hiding this comment.
I believe this needs the PAT pool set up in order to work: https://github.com/dotnet/sdk/blob/main/.github/workflows/shared/pat_pool.README.md
There was a problem hiding this comment.
Wouldn't this use the same pat pool as the tactics flow? I believe both Jeff and I maintain active pats in that pool (mine is definitely active at the moment). It'd be good to get another person adding pats until we have a more central solution.
There was a problem hiding this comment.
Logan has a great point here, I need to actually inject that pool env into this env.
There was a problem hiding this comment.
I tried to double check this worked by replacing a different workflow file's contents on main with a new branch on this upstream that allowed manual_dispatch with this .md and .lock but its reasonably blocked from running until it is in main so here we gooo
Summary
Introduces an agentic triager flow to the .NET SDK repository.
You can try it out yourself:
& 'C:\Program Files\GitHub CLI\gh.exe' workflow run issue-triage.lock.yml --repo fork/sdk --ref agentic-triage -f issue_number=nwith your own private fork if you push this branch to the fork and write an issue.Related #55185
Expected Impact
needs-more-infostyle issues to request follow up automaticallyCriteria
needs-more-infolabels on issues that do not need that.codeowners.mdcookielabelFor Reviewers
I looked at a variety of existing triaging skills and imported them directly into the commit history but then made edits on top of them to better suit our scenarios.
I did not find any that meet all of the criteria above being used in production across GitHub. However, I found pieces with the best ones.
Codeowners.md had some existing failures - the new one introduced here is due to a private group that needs a permissions change.
Future Improvement
I hard-coded the expansion of
codeowners.md; in the commit history you can see an attempt I made to fetch that and also allow fetching members in the teams on codeowners, but this requires several more tokens to be created and a lot of extra logic/scripts. I think it's best to follow up so this review can focus on the triage .md definition, and then the other review can focus on the PAT token approach.Examples
I copied all labels on the .NET SDK repo to my own
nagilson/sdkfork.I then assessed the agent on various issue queries, and reset comments/labels until I was satisfied.
Note that the @/pings do not work because the assigned individuals are not members of
nagilson- the same is true for when it tries to assign an individual besides myself.Note that the @team-pings will require an additional org level read scope to not be quoted (not part of this code change).
Clarify usage of _IsPublishing in RuntimeInferenceTargets nagilson/sdk#14 (comment)
dotnet workload restore fails with NETSDK1400 on 10.0.301 nagilson/sdk#33
NETSDK1139: browser platform identifier not recognized with .NET 10 WASM nagilson/sdk#25
Update baseline dependents from arcade's eng/ folder in release/9.0.1xx to match 9.0.3xx versions nagilson/sdk#12
It also does not grab the 'test' label even though xunit and mstest are part of this short issue - it instead identifies it properly as a ci test flake problem: Update any remaining tests from XUnit to MSTest nagilson/sdk#15
Improve dotnetup's documentation to include 'daily' channels nagilson/sdk#13
.NET MAUI Not appearing on Visual Studio 2022 Community nagilson/sdk#27
It did not apply this mistake to a shorter and minimalistic issue that had at least a specific error message and repro steps: Internal CLR error. (0x80131506) nagilson/sdk#28
Blazor WASM publish fails in Razor SDK static web assets on 10.0.301 nagilson/sdk#34
dotnetup: Make sure running dotnetup is "instantaneous" nagilson/sdk#49
Project variables in
launchSettings.jsonnot subsituted when usingdotnet runnagilson/sdk#43You can see some of the different formats for output I tried here before I settled on the final version:
nagilson#32
Criteria Coverage on Existing Triager Agentic Workflows (✓ = validated live where noted)
needs-triage/untriaged¹ mxc validated on a thin sample (3 issues, all maintainer-filed):
#612assignedindividualsand posted as the bot;#613/#620got no owner (area→owner map is sparse);#613received two triage comments (re-run noise).² Azure validated on
#60838: labeled +Service Attention+needs-team-attentionas the bot, but did not assign an individual³ agentics via typespec
#11227: labels applied, verbose "Agentic Triage" comment, and no owner assignment.Examples of other Triagers (with validated caveats)
issue-triage.md#612)github-actions[bot];min-integrity+ integrity-guard fix; Model Aissue-triage.md(imports agentics)#11227)min-integrity: nonejustified for public-repo external contributorsissue-triage-agent.md#2728was the policy-service (fabricbot), not the AI agent; recent spam (#3014,#2996) sat untriaged → AI triage not reliably running. Group @mention only, no individual assignmentmin-integrity: none+allowed-reposscoped; add-only labels; never closesissue-repro-triage.md(+ quality/report workflows)Needs: Additional Info; reproduces & drafts fix PRs#16234): agentic output posted under a maintainer's personal account (nohwnd), not a bot — write-back uses a personal PAT.min-integrity: none; org GitHub App fallback intended but not in effect hereauto-triage-issues.mdneeds-triagefallback;communitydetection; per-run caps +max-daily-ai-creditsmin-integrity: approved(labeler-only); shows cost/rate-limit knobsmin-integrityvalueallowed-repos