Skip to content

fix: add broader dedup search before fallback issue creation#2454

Merged
alex-solovyev merged 1 commit intomainfrom
bugfix/claim-task-id-dedup
Feb 27, 2026
Merged

fix: add broader dedup search before fallback issue creation#2454
alex-solovyev merged 1 commit intomainfrom
bugfix/claim-task-id-dedup

Conversation

@alex-solovyev
Copy link
Collaborator

Summary

  • Adds a GitHub search-based duplicate detection check in claim-task-id.sh before the fallback gh issue create path
  • Extracts the descriptive part of the title (stripping prefixes like t1344:, coderabbit:, etc.) and searches all issues (open + closed) for matches
  • Returns the existing issue number instead of creating a duplicate when a match is found

Problem

create_github_issue() line 520 had a fallback that created bare GitHub issues with zero duplicate detection. The primary path via issue-sync-helper.sh push has dedup, but only matches startswith("tNNN:") — missing issues with different title prefixes. When the helper failed, the fallback created duplicates unconditionally (observed: #2421 duplicated #2410).

Fix

Before the fallback gh issue create, the new code:

  1. Gets the repo slug via gh repo view
  2. Strips the title prefix to get the descriptive keywords
  3. Searches all issues via gh issue list --search (full-text, not prefix-only)
  4. Returns the existing issue number if found, skipping creation

This is belt-and-suspenders alongside the intelligence-layer fix in PR #2446.

Verification

  • ShellCheck: zero violations (shellcheck -x)
  • Change is additive — only adds a guard before the existing fallback path
  • All error paths handled with 2>/dev/null || echo "" to avoid breaking the fallback

Closes #2447

claim-task-id.sh fallback at line 520 created issues unconditionally when
issue-sync-helper.sh failed. This caused duplicates when the same task had
different title prefixes (e.g., 't1344:' vs 'coderabbit:'). Add a GitHub
search-based dedup check that matches across the full title before falling
back to bare gh issue create.
@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions bot added the bug Auto-created from TODO.md tag label Feb 27, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

Warning

Rate limit exceeded

@alex-solovyev has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 28 minutes and 50 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 07ef131 and 0eaec8d.

📒 Files selected for processing (1)
  • .agents/scripts/claim-task-id.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/claim-task-id-dedup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 36 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Fri Feb 27 05:03:11 UTC 2026: Code review monitoring started
Fri Feb 27 05:03:11 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 36

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 36
  • VULNERABILITIES: 0

Generated on: Fri Feb 27 05:03:14 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

@alex-solovyev alex-solovyev merged commit 8e34d03 into main Feb 27, 2026
16 checks passed
@marcusquinn marcusquinn deleted the bugfix/claim-task-id-dedup branch March 3, 2026 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Auto-created from TODO.md tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: claim-task-id.sh fallback creates duplicate issues without dedup check

1 participant