Replace genai dedup action with agentic duplicate-surfacing workflow - #6400
Merged
Conversation
Replaces automatic-issue-deduplication.yml (which ran with label_as_duplicate: false and produced no visible signal) with a gh aw agentic workflow that surfaces likely duplicates by meaning on newly opened issues. The agent applies a Possible-Duplicate label and posts one comment with candidate duplicates for maintainer review; it never closes issues, removes Needs-Triage, or emits the Duplicate of trigger. Outputs are constrained by a safe-outputs allowlist. Closes microsoft#6399 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3701d64a-96ba-42f1-be59-b4e7d2a2820a
This comment was marked as outdated.
This comment was marked as outdated.
Resolves the Check Spelling failure on the duplicate-surfacing workflow: 'toolsets' (gh aw frontmatter) and 'msftbot' (bot comment template tag). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3701d64a-96ba-42f1-be59-b4e7d2a2820a
denelon
marked this pull request as ready for review
July 29, 2026 00:55
JohnMcPMS
approved these changes
Jul 29, 2026
This was referenced Jul 29, 2026
denelon
added a commit
that referenced
this pull request
Jul 29, 2026
## 📖 Description The agentic **Duplicate Surfacing** workflow (added in #6399 / #6400) inherited gh-aw's **default no-op reporting**. When a run finds no likely duplicate — the common case for most newly opened issues — gh-aw logs the run to an auto-created **"[aw] No-Op Runs"** tracking issue (#6406), adding a comment per run. On a high-volume repo like winget-cli this produces near-constant noise and contradicts the workflow's intended design: **detect-only, and stay silent unless a likely duplicate is found**. This PR sets `safe-outputs.noop.report-as-issue: false` in the workflow frontmatter and recompiles the lock. The change is config-only — the detect → label (`Possible-Duplicate`) → comment behavior is unchanged; only the no-op issue/comment reporting is turned off. Reported by @Trenly on #6406. _Authored with GitHub Copilot assistance._ ## 🔗 References - Resolves #6407 - Follow-up to #6399 / #6400 - Feedback: #6406 (the auto-managed "[aw] No-Op Runs" tracking issue; gh-aw-managed and self-expiring) ## 🔍 Validation - `gh aw compile duplicate-surfacing` → **0 errors, 0 warnings**. - Lock diff is limited to the no-op toggle: `noop.report-as-issue` and `GH_AW_NOOP_REPORT_AS_ISSUE` flip `true` → `false` in the three generated config sites, plus the frontmatter hash. No job structure, permissions, or action pins changed. - Prior production run confirmed the detect/label/comment path works (#6404 → surfaced #6388); this PR does not touch that path. ## ✅ Checklist - [x] Signed the [Contributor License Agreement](https://cla.opensource.microsoft.com) - [x] Linked to an issue - [ ] Updated [Release Notes](../doc/ReleaseNotes.md) (if applicable) - [ ] Updated documentation (if applicable) - [ ] Updated [Copilot instructions](.github/copilot-instructions.md) (if build, architecture, or conventions changed) ## 📋 Issue Type - [ ] Bug fix - [x] Feature - [ ] Task ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/6408) Co-authored-by: Demitrius Nelon <denelon@outlook.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3701d64a-96ba-42f1-be59-b4e7d2a2820a
This was referenced Jul 29, 2026
denelon
added a commit
that referenced
this pull request
Jul 29, 2026
…ries) (#6410) ## 📖 Description The agentic **Duplicate Surfacing** workflow (#6399 / #6400) reasons about duplicates semantically, but its **only retrieval mechanism is GitHub's full-text issue search**, whose relevance ranking buries older, sparsely-worded issues. Genuine duplicates that never surface in search can never be judged by the model. **Concrete miss** (found by @Trenly, #6406): on **#6405** ("Support source type detection") the agent ran jargon-heavy queries (`source add --type PreIndexedPackage Rest autodetect`, etc.) and no-op'd — but **#1477** ("The type of a source should be automatically detected when possible") is a near-verbatim duplicate (same feature *and* same proposed `/information`-endpoint mechanism). GitHub full-text search never returned #1477, even for its own title words; only `in:title` concept searches surface it. This PR updates the workflow's "How to search" guidance to raise recall: - Always run at least two `in:title` concept searches (2–3 core nouns). - Prefer short, high-recall queries; don't pile many exact CLI tokens into one query. - Vary noun/verb vocabulary (weak stemming) and scan ~20–30 results per search. The change is prompt-only — detection thresholds, safe-outputs, permissions, and action pins are unchanged. _Authored with GitHub Copilot assistance._ ## 🔗 References - Resolves #6409 - Follow-up to #6399 / #6400 - Feedback: #6406 (Trenly); real duplicate demonstrated: #6405 ↔ #1477 ## 🔍 Validation - `gh aw compile duplicate-surfacing` → **0 errors, 0 warnings**. - **`gh aw trial` replaying #6405** against the live winget-cli corpus: with the new guidance the agent surfaces **#1477** with **HIGH** confidence (label + comment), exactly the duplicate previously missed. - Diff is limited to the "How to search" prompt section plus the regenerated lock; no job/permission/action-pin changes. ## ✅ Checklist - [x] Signed the [Contributor License Agreement](https://cla.opensource.microsoft.com) - [x] Linked to an issue - [ ] Updated [Release Notes](../doc/ReleaseNotes.md) (if applicable) - [ ] Updated documentation (if applicable) - [ ] Updated [Copilot instructions](.github/copilot-instructions.md) (if build, architecture, or conventions changed) ## 📋 Issue Type - [ ] Bug fix - [x] Feature - [ ] Task ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/6410) Co-authored-by: Demitrius Nelon <denelon@outlook.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3701d64a-96ba-42f1-be59-b4e7d2a2820a
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.
📖 Description
Replaces
automatic-issue-deduplication.yml(which usedpelikhan/action-genai-issue-dedup@v0withlabel_as_duplicate: false, so it produced no visible signal — no label, no comment) with a GitHub Agentic Workflow (gh aw) that surfaces likely duplicates for maintainer review.On every newly opened issue, a Copilot-engine agent reads the issue and searches existing issues (open and closed) by meaning, not keyword overlap, then — only when confident — applies a new
Possible-Duplicatelabel and posts a single comment listing up to five candidate duplicates with links and one-line rationale.The workflow detects but never resolves: it never closes the issue, never removes
Needs-Triage, and never emits theDuplicate of #NNNmoderator trigger. Choosing the canonical issue (earliest / curated preferred) and closing stays a maintainer decision.Why replace the current action
label_as_duplicate: false— no label, no comment, so duplicates are still found manually.winget catorwinget show --verbatim#1458 ("show manifest verbatim") and Verbose show command #159 ("Verbose show command") are the same request but read very differently.safe-outputsallowlist (one comment + one label — no close, no assign, no code execution).Changed files
.github/workflows/duplicate-surfacing.md(agentic spec).github/workflows/duplicate-surfacing.lock.yml(compiled viagh aw compile; generated — do not hand-edit).github/aw/actions-lock.json(pinned action versions for the framework).gitattributes(marks*.lock.ymlas generated /merge=ours).github/workflows/automatic-issue-deduplication.yml.github/actions/spelling/allow.txt(addtoolsetsandmsftbot)New label required:
Possible-Duplicate(advisory), distinct from the authoritativeResolution-Duplicate(applied on human confirmation via the trigger). See the linked issue for the label plan.Enablement prerequisites (org/repo): agentic workflows enabled + the Copilot engine and its secrets (
COPILOT_GITHUB_TOKEN,GH_AW_GITHUB_TOKEN,GH_AW_GITHUB_MCP_SERVER_TOKEN). Same framework microsoft/mxc adopted (#639/#646).Safety posture:
safe-outputsrestricts the agent toadd-labels: [Possible-Duplicate](max 1) andadd-comment(max 1); MCP GitHub access is repo-scoped; workflow token isissues: read; issue content is treated as untrusted (prompt-injection defenses); trigger isopenedonly to bound comment volume; egress is firewalled to a pinned domain allowlist.Authored with GitHub Copilot assistance.
🔗 References
🔍 Validation
gh aw compile duplicate-surfacing→ 0 errors, 0 warnings; lock file regenerated deterministically.gh aw trial(simulated issue Add command or flag to show manifest verbatim (in CLI) - i.e.winget catorwinget show --verbatim#1458 against microsoft/winget-cli): the agent appliedPossible-Duplicate(HIGH confidence) and surfaced Verbose show command #159 as the duplicate — the exact semantic match lexical/TF-IDF scoring misses (~0.15). No close, noDuplicate oftrigger, correct comment format. Trial repo was private and deleted after.🚀 Rollout & enablement
safe-outputslimited to one comment + thePossible-Duplicatelabel, no code changes, no PRs. Chosen deliberately for a public, first-party repo to build trust before considering broader automation.GITHUB_TOKENtogether with thecopilot-requests: writejob permission. A dedicatedCOPILOT_GITHUB_TOKENsecret is not configured or needed (same setup microsoft/mxc uses, Fix typo #639/New Manifest Schema and Structure #646). Copilot is already available to Actions in themicrosoftorg.GITHUB_TOKENis read-only; this workflow'ssafe-outputsjobs requestissues: write+pull-requests: writeexplicitly, which overrides the default — no repo-wide setting change was needed.github/gh-aw-actions/*@*was added so the gh-aw setup action is permitted. GitHub-ownedactions/*were already allowed; the gh-aw container images (ghcr.io/github/gh-aw-*) are pulled at runtime and are not gated by the actions allow-list.GH_AW_CI_TRIGGER_TOKENon this repo (abuse risk per gh aw docs).✅ Checklist
📋 Issue Type