claude-dedupe-issues.yml logs github_duplicate_comment_added on every run, even when no duplicate comment was posted

Status Open
Maintainer reply None cached
Activity 1 comment · opened Jul 19, 2026

The "Log duplicate comment event to Statsig" step in .github/workflows/claude-dedupe-issues.yml runs with if: always() (line 46) and unconditionally emits github_duplicate_comment_added with value 1 whenever STATSIG_API_KEY is present.

But the /dedupe command explicitly bails without posting a comment in several cases: the issue is closed, it already has a duplicates comment, or no duplicates survive false-positive filtering. And if: always() means the step also fires when the claude-code-action step fails outright.

So the metric counts workflow runs (roughly, issues opened), not duplicate comments added. Any dashboard reading github_duplicate_comment_added is silently overcounting.

Fix: drop if: always() and, inside the step, skip logging unless a bot comment containing the duplicate marker was created on the issue after the run started (the issues comments API supports since=). This is distinct from the open PRs touching the same step (#69716 and #77442 fix the time: unit; #68682 fixes the HTTP status check); none of them gate the emission. Happy to open a PR.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗