Skip to content

Add agentic Duplicate Surfacing workflow (#299) - #300

Merged
denelon merged 1 commit into
microsoft:mainfrom
denelon:denelon/agentic-dup-surfacing
Jul 30, 2026
Merged

Add agentic Duplicate Surfacing workflow (#299)#300
denelon merged 1 commit into
microsoft:mainfrom
denelon:denelon/agentic-dup-surfacing

Conversation

@denelon

@denelon denelon commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

📖 Description

Adds the agentic Duplicate Surfacing workflow to winget-dsc, matching the implementation shipped in winget-cli and piloted in winget-create (microsoft/winget-create#687).

On newly opened issues, the workflow searches existing issues (open and closed) for likely duplicates by meaning. When it has at least one high-confidence candidate, it posts a single comment listing the candidates and applies the Possible-Duplicate label. It never closes issues, removes Needs-Triage, or posts the Duplicate of #NNN moderator trigger — the close decision stays with a human.

This lands with the #6412 comment-cleanup refinements already baked in (see microsoft/winget-cli#6414): friendly contributor-facing guidance and a consolidated H6 Template footer with a run link.

Files

  • .github/workflows/duplicate-surfacing.md — GitHub Agentic Workflow source.
  • .github/workflows/duplicate-surfacing.lock.yml — compiled workflow (generated by gh aw compile).
  • .github/aw/actions-lock.json — pinned action SHAs (generated).
  • .gitattributes — marks the generated .lock.yml as linguist-generated.
  • .github/actions/spelling/{allow.txt,excludes.txt} — spelling excludes for .github/aw/ and the generated *.lock.yml, plus allow tokens (autodetect, noop, PreIndexedPackage, toolsets, NNN).
  • .markdownlint-cli2.yaml — ignore .github/workflows/*.md (the workflow prompt isn't standard prose).

Rendered comment

Possible duplicate(s):

Thank you for submitting this issue.

The issue(s) below may already track your request or bug. Please take a look — if one of them matches, give that issue a 👍 and close this one as a duplicate. Older or curated issues are preferred as the canonical one to follow.

  • #… — …
Template: msftbot/duplicate/surfaced by Duplicate Surfacing

🔗 References

Resolves #299
Follows microsoft/winget-cli (Duplicate Surfacing) and microsoft/winget-create#687; comment cleanup per microsoft/winget-cli#6412 / microsoft/winget-cli#6414

🔍 Validation

  • gh aw compile duplicate-surfacing → 0 errors, 0 warnings.
  • The identical workflow (same canonical .md) was validated live in a private demo repo: it posted the exact comment above (header + guidance + H6 footer with the run URL rendered) and applied the Possible-Duplicate label.
  • Note: the workflow won't run until repo Actions permissions allow its actions (github/gh-aw-actions/*, check-spelling/*, DavidAnson/markdownlint-cli2-action/*, tj-actions/changed-files/*). Requires an admin to lock down selected actions (tracked separately).

✅ Checklist

📋 Issue Type

  • Feature

Authored with GitHub Copilot assistance.

Microsoft Reviewers: Open in CodeFlow

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions

This comment has been minimized.

Ports the gh-aw Duplicate Surfacing workflow from microsoft/winget-cli
(PRs #6400, #6408, #6410) and the winget-create pilot (#687) to
winget-dsc. On newly opened issues, an agent searches existing issues
and, when it finds a likely duplicate, applies the Possible-Duplicate
label and posts an advisory comment for maintainer review. It never
closes issues or applies duplicate-close triggers (detect-only).

Includes both winget-cli refinements: no-op runs are not reported as
tracking issues (noop.report-as-issue: false), and search guidance
mandates high-recall in:title queries to surface old, sparse-body
duplicates.

- Excludes the generated gh-aw artifacts (.github/aw/, *.lock.yml) from
  Check Spelling, and the workflow prompt .md from markdownlint
  (.github/workflows/*.md), since both are machine-authored.
- Adds autodetect, noop, PreIndexedPackage, toolsets, and NNN to the
  spelling allow list for the workflow prompt text.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3701d64a-96ba-42f1-be59-b4e7d2a2820a
@denelon
denelon force-pushed the denelon/agentic-dup-surfacing branch from 5d1cc1e to 0284000 Compare July 30, 2026 15:14
@denelon
denelon marked this pull request as ready for review July 30, 2026 15:26
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Agentic Workflows-based “Duplicate Surfacing” automation to help maintainers identify likely duplicate issues by searching existing issues and (when confident) posting a single “Possible duplicate(s)” comment and applying a Possible-Duplicate label.

Changes:

  • Introduces the Duplicate Surfacing agentic workflow source (.md) and its generated compiled workflow (.lock.yml).
  • Updates repo quality gates to ignore agentic workflow sources/outputs where appropriate (markdownlint + check-spelling allow/exclude updates).
  • Adds generated-artifact handling metadata (Linguist generated marking via .gitattributes) and pins agentic action SHAs (.github/aw/actions-lock.json).

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.markdownlint-cli2.yaml Ignores .github/workflows/*.md from markdownlint checks.
.github/workflows/duplicate-surfacing.md Adds the agentic workflow prompt/policy for duplicate surfacing.
.github/workflows/duplicate-surfacing.lock.yml Adds the generated compiled GitHub Actions workflow implementing the agentic run.
.github/aw/actions-lock.json Adds pinned SHA mapping for the gh-aw setup action.
.github/actions/spelling/excludes.txt Excludes agentic workflow generated artifacts and .github/aw/ from spelling checks.
.github/actions/spelling/allow.txt Allows workflow-specific tokens (e.g., autodetect, noop, NNN, toolsets).
.gitattributes Marks *.lock.yml as generated (and currently configures a merge driver).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .gitattributes
.github/actions/spelling/** text eol=lf
*.winget linguist-language=yaml

.github/workflows/*.lock.yml linguist-generated=true merge=ours No newline at end of file

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the standard gh-aw-generated .gitattributes line and is intentionally kept identical to the canonical winget-cli repo (where the Duplicate Surfacing workflow was first landed in #6414). An unconfigured ours merge driver only produces a warning and falls back to the default merge — it's non-fatal — and .lock.yml is a generated artifact that's regenerated by gh aw compile anyway. Keeping this line consistent across the winget repo family (rather than dropping it in just this repo) avoids drift. No change here.

@denelon
denelon merged commit 966de19 into microsoft:main Jul 30, 2026
4 checks passed
@denelon
denelon deleted the denelon/agentic-dup-surfacing branch July 30, 2026 20:00
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.

Add agentic Duplicate Surfacing workflow

3 participants