Auto-triage: label-gated follow-up, partial-progress acknowledgement, and /triage on-demand command#4324
Open
priyankatiwari08 wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Extends the SqlClient issue auto-triage workflow to optionally run one follow-up triage pass when (and only when) the original triage reported missing environment details and the issue author subsequently comments, with guardrails to avoid repeated/irrelevant reruns.
Changes:
- Adds
issue_comment.createdas a trigger with a workflow-levelif:gate to avoid booting the agent for non-author / bot / PR-comment events. - Introduces a prompt-level “Follow-up gate” that re-checks existing comments and calls
noopunless the follow-up criteria are met. - Increases
safe-outputs.add-comment.maxto allow up to two triage summaries per issue (initial + one follow-up), relying onhide-older-commentsfor UX.
Comment on lines
+27
to
+31
| permissions: | ||
| contents: read | ||
| issues: read | ||
| pull-requests: read | ||
|
|
Extends the issue auto-triage workflow so a second (and final) triage summary is produced when: 1. The first triage flagged missing environment fields, AND 2. The original issue author responds with a follow-up comment. No further triage runs after the second summary. Comments from other users, bots, or on PRs do not trigger re-triage. NOTE: Maintainers must run 'gh aw compile' to regenerate .github/workflows/issue-triage.lock.yml from this .md source.
9f32d55 to
ad13622
Compare
Comment on lines
1
to
3
| # gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"e98945dcd5993e27b71e3600298e58d5205517079d21b6024c05b338fbfded9c","compiler_version":"v0.72.1","strict":true,"agent_id":"copilot"} | ||
| # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"bc56a0cad2f450c562810785ef38649c04db812a","version":"v0.72.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.41","digest":"sha256:cb2b565d070116d4b67e355775340528b5a2c3cb18b2c9049638bcc2df681770","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.25.41@sha256:cb2b565d070116d4b67e355775340528b5a2c3cb18b2c9049638bcc2df681770"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41","digest":"sha256:fadd0de387209f69a9a7a1b8722bb5e7fdfb80ba9749a5c60f0e4cd7582a74d0","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41@sha256:fadd0de387209f69a9a7a1b8722bb5e7fdfb80ba9749a5c60f0e4cd7582a74d0"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.41","digest":"sha256:1260445d25968dbf3ae70143964177a0e5914cf2ce07a6117f7d3caec6c3e3c4","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.25.41@sha256:1260445d25968dbf3ae70143964177a0e5914cf2ce07a6117f7d3caec6c3e3c4"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.6","digest":"sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3","digest":"sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} | ||
| # ___ _ _ |
Comment on lines
+33
to
+39
| && ( | ||
| (startsWith(github.event.comment.body, '/triage') | ||
| && contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) | ||
| || | ||
| (github.event.comment.user.login == github.event.issue.user.login | ||
| && contains(github.event.issue.labels.*.name, 'Auto-Triage: Waiting for Author')) | ||
| )) |
saurabh500
reviewed
May 29, 2026
| @@ -1,4 +1,4 @@ | |||
| # gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"20b8fbbfaae4d08b3206fb6b2f4000e43b8915e37f5afc9a534056f8ce9a563b","compiler_version":"v0.72.1","strict":true,"agent_id":"copilot"} | |||
Contributor
There was a problem hiding this comment.
Why do we check in this lock file?
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
Today the
SqlClient Issue Auto-Triageworkflow runs exactly once — when an issue is opened. When that initial summary reports⚠️ Missing:and asks the author to supply more info, the author's reply currently produces no new triage analysis, even though the previous summary is effectively stale.This change extends the workflow with three new capabilities, all controlled cheaply at the YAML
if:level so the Copilot agent only boots when worthwhile:⚠️ Missing:, the workflow applies an internal-state label and the issue author's subsequent comments re-trigger the workflow until the env is complete./triageon-demand command — repo maintainers can comment/triageon any issue to force a fresh triage analysis, bypassing label state and prior-summary counts.Behavior
if:)Auto-Triage: Waiting for Authorlabel if env is missingnoop— no comment posted, label stays⚠️ Partial: received X, Y; still missing: A, Bsummary, label stays$0)$0)$0)$0)/triagefrom a repoOWNER/MEMBER/COLLABORATOR/triagefrom a non-maintainer (drive-by commenter)$0)How it's enforced
Layer 1 — Workflow-level
if:(free, $0 if it returns false):This filters out the obvious non-matches (bot commenter, non-author commenter on un-labeled issue, PR comments, non-maintainer
/triage) before the agent activation job runs. Skipped activation jobs use zero compute.Layer 2 — Prompt-level "Follow-up routing": instructs the agent to compute
BEFOREandAFTERenv-field snapshots and route into one of three sub-cases —No progress→ silentnoop,Partial progress→ fresh summary + keep label,Complete→ fresh summary + remove label. The agent is responsible for adding/removing the label via the newadd-labels/remove-labelssafe-outputs (both restricted to the single labelAuto-Triage: Waiting for Authorviaallowed:).safe-outputs.add-comment.maxstays at1per run (the workflow simply runs multiple times, once per author comment that passes the gate).hide-older-comments: truecollapses the previous summary so only the latest is visible.New label
This PR introduces one new internal-state label:
Auto-Triage: Waiting for Author— applied by the workflow when env fields are missing, removed when they are complete. Maintainers should not apply/remove it manually; the workflow manages it.The
safe-outputs.add-labels.allowed/remove-labels.allowedlists restrict the workflow to managing only this one label.Files changed
.github/workflows/issue-triage.md— newif:expression,add-labels/remove-labelssafe-outputs, three-scenario overview (Initial / Follow-up / On-demand), Label-managed state section, Follow-up routing section,⚠️ Partial:env-row format, label-management actions..github/workflows/issue-triage.lock.yml— regenerated bygh aw compile v0.72.1. Included in this PR — no maintainer compile step required.Validation
End-to-end tested on a personal fork (
priyankatiwari08/SqlClient-test-prtiwar):⚠️ Missing:+ label added⚠️ Partial:summary, label stays/triageon any issueCost shape
if:level, zero compute cost.