From 0892e2cc2dc3ee5f7495ccaf2e6cc38bae706e55 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Feb 2026 05:51:47 +0000 Subject: [PATCH 1/2] Initial plan From ce15576e109e5fcd811f4979773fac40d2107fec Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Feb 2026 06:05:44 +0000 Subject: [PATCH 2/2] fix: require noop tool call in duplicate-code-detector when no issues found Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/duplicate-code-detector.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/duplicate-code-detector.md b/.github/workflows/duplicate-code-detector.md index 18b1ed16f3..ba3974afa1 100644 --- a/.github/workflows/duplicate-code-detector.md +++ b/.github/workflows/duplicate-code-detector.md @@ -107,6 +107,20 @@ Create separate issues for each distinct duplication pattern found (maximum 3 pa - Limit to the top 3 most significant patterns if more are found - Use the `create_issue` tool from safe-outputs MCP **once for each pattern** +**When No Issues Are Found**: + +**YOU MUST CALL** the `noop` tool when analysis completes without finding significant duplication: + +```json +{ + "noop": { + "message": "✅ Duplicate code analysis complete. Analyzed [N] files changed recently. No significant duplication detected (threshold: >10 lines or 3+ similar patterns)." + } +} +``` + +**DO NOT just write this message in your output text** - you MUST actually invoke the `noop` tool. The workflow will fail if you don't call either `create_issue` or `noop`. + **Issue Contents for Each Pattern**: - **Executive Summary**: Brief description of this specific duplication pattern - **Duplication Details**: Specific locations and code blocks for this pattern only @@ -231,6 +245,7 @@ For each distinct duplication pattern found, create a separate issue using this - Suggest practical refactoring approaches - Assign issue to @copilot for automated remediation - Use descriptive titles that clearly identify the specific pattern (e.g., "Duplicate Code: Error Handling Pattern in Parser Module") +- **If no significant duplication found, call `noop` tool** - never complete without calling either `create_issue` or `noop` ## Tool Usage Sequence