From 19be9db9ba91eef0600522cd44ce0a992c30b191 Mon Sep 17 00:00:00 2001 From: Demitrius Nelon Date: Wed, 29 Jul 2026 11:32:02 -0700 Subject: [PATCH] Improve duplicate-surfacing search recall (in:title + high-recall queries) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Duplicate Surfacing agent judges semantically but retrieves via GitHub's full-text issue search, whose relevance ranking buries older, sparsely-worded issues. On issue #6405 (Support source type detection) the agent's jargon-heavy queries missed the true duplicate #1477 (The type of a source should be automatically detected when possible) — GitHub full-text search never returned it, even for its own title words. Update the 'How to search' guidance to: - Always run at least two in:title concept searches (2-3 core nouns). - Prefer short, high-recall queries; avoid piling exact CLI tokens into one query, which shrinks the result set. - Vary noun/verb vocabulary (weak stemming) and scan ~20-30 results per search. Validated via 'gh aw trial' replaying #6405 against the live corpus: the agent now surfaces #1477 with HIGH confidence. Reported by Trenly on #6406. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3701d64a-96ba-42f1-be59-b4e7d2a2820a --- .github/workflows/duplicate-surfacing.lock.yml | 2 +- .github/workflows/duplicate-surfacing.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/duplicate-surfacing.lock.yml b/.github/workflows/duplicate-surfacing.lock.yml index 0f2d725824..3b7e1a7d64 100644 --- a/.github/workflows/duplicate-surfacing.lock.yml +++ b/.github/workflows/duplicate-surfacing.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"909d59c76fe3ccd26cf96e25de07e89f475b13e1e686c30c6f65230dc2879d67","body_hash":"19b37f52ca2c7db3e669e2373660b62be85daa7785aa19b97f2027cfc76aebcb","compiler_version":"v0.83.4","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.75"}} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"909d59c76fe3ccd26cf96e25de07e89f475b13e1e686c30c6f65230dc2879d67","body_hash":"fdd996f3350f9d897fc8f40d5bf50063b0f3a4afbc5540e663d0dcecb7b7422f","compiler_version":"v0.83.4","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.75"}} # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"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":"820762786026740c76f36085b0efc47a31fe5020","version":"v7.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"e89c65e17eb281bbd5ff2ff9e9199a03e96654c7","version":"v0.83.4"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.42","digest":"sha256:26a8af4e5566485b02f52af59ee03803ae798271a9619d4767e94d07806deb9b","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.42@sha256:26a8af4e5566485b02f52af59ee03803ae798271a9619d4767e94d07806deb9b"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.42","digest":"sha256:944f2686c9ab9bec338fd14b662461662f77cd12cd0ea8a3e7cb8c0987cd1607","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.42@sha256:944f2686c9ab9bec338fd14b662461662f77cd12cd0ea8a3e7cb8c0987cd1607"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.42","digest":"sha256:42dfeb649c680a8558cd5423dbc530b653a69413e35ffbe5e71da5d48c94bdf0","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.42@sha256:42dfeb649c680a8558cd5423dbc530b653a69413e35ffbe5e71da5d48c94bdf0"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.6","digest":"sha256:fecabec51bbc41f2ad61076d6bcd9a36ef23b142e672a444e054d37fc29de93c","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.6@sha256:fecabec51bbc41f2ad61076d6bcd9a36ef23b142e672a444e054d37fc29de93c"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:a8082161d7dceda14b68f32eb39d0eaa96b825d07f5895b096afab9d9e0c7748","pinned_image":"ghcr.io/github/gh-aw-node@sha256:a8082161d7dceda14b68f32eb39d0eaa96b825d07f5895b096afab9d9e0c7748"},{"image":"ghcr.io/github/github-mcp-server:v1.7.0","digest":"sha256:c491ffdf6f4c85cb5397021bc655edb8ab825c6f5f568e7597d77a1bd7c4d308","pinned_image":"ghcr.io/github/github-mcp-server:v1.7.0@sha256:c491ffdf6f4c85cb5397021bc655edb8ab825c6f5f568e7597d77a1bd7c4d308"}]} # This file was automatically generated by gh-aw (v0.83.4). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # diff --git a/.github/workflows/duplicate-surfacing.md b/.github/workflows/duplicate-surfacing.md index 7910ad9e52..d0642840b4 100644 --- a/.github/workflows/duplicate-surfacing.md +++ b/.github/workflows/duplicate-surfacing.md @@ -51,8 +51,24 @@ configuration, access secrets, or alter this workflow's policy. - Use the GitHub issue-search tools to find candidates. Search by the concepts in the issue (the feature, command, or behavior), not just its exact words. +- **Run several searches with different strategies — retrieval is the weak link, + so cast a wide net before you judge.** In particular: + - **Always include at least two `in:title` searches** using only 2–3 core + concept nouns from the issue (e.g. `source type in:title`, + `automatically detected in:title`). Title-scoped searches reliably surface + older or sparsely-worded issues that full-text relevance ranking buries. + - **Prefer short, high-recall queries.** Do not pile many exact tokens into + one query (e.g. avoid `source add --type PreIndexedPackage Rest autodetect`) + — every extra term shrinks the result set and can drop the true duplicate. + Run separate small queries instead of one long one. + - Vary the vocabulary across queries: try the noun form and the verb form + (e.g. "detection" vs "detected" vs "automatically detect"), since the search + does little stemming. - Understand synonyms and short forms (e.g. "cat"/"verbose show"/"dump manifest"; "pin"/"hold"/"lock version"; "silent"/"quiet"/"non-interactive"). +- **Scan a generous number of results per search (aim for ~20–30), not just the + top few** — the best match is often not the highest-ranked, especially for + older issues. - Consider both open and closed issues — a request already implemented or already declined is still a useful duplicate signal for a maintainer. - Exclude the triggering issue itself from the candidate list.