You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #456 merged and closed #455. The pulse then dispatched a worker against #468 (still OPEN, status:queued). The worker correctly detected the work was done and closed the issue — but only after being dispatched unnecessarily.
Root cause
Two gaps:
Gap 1 — No deduplication at issue creation time. Before gh issue create, there is no check for existing issues with similar titles. If issue-sync runs multiple times (or multiple workers each create their own issue), duplicates accumulate.
Gap 2 — Dispatch checks OPEN state but not related merged PRs. The pulse correctly skips CLOSED issues. But it does not check whether a merged PR already implements the same feature. A duplicate issue that was never linked to the merged PR stays OPEN and gets dispatched.
Proposed fixes
Issue creation dedup: before gh issue create in issue-sync-helper.sh and claim-task-id.sh, run gh issue list --search "<title keywords>" --state all and skip creation if a semantically similar issue exists (open or recently closed).
Pre-dispatch merged-PR check: in the pulse dispatch step, before assigning a worker, search for merged PRs that reference the issue's task keywords. If found, close the duplicate issue with a comment pointing to the merged PR instead of dispatching.
Single-issue-per-task enforcement: claim-task-id.sh should store the GH issue number atomically alongside the task ID claim, preventing a second claim from creating a second issue for the same task ID.
Observed behaviour
The pulse created 6 duplicate issues for the same feature (universal tax fallback) on the same day:
PR #456 merged and closed #455. The pulse then dispatched a worker against #468 (still OPEN, status:queued). The worker correctly detected the work was done and closed the issue — but only after being dispatched unnecessarily.
Root cause
Two gaps:
Gap 1 — No deduplication at issue creation time. Before
gh issue create, there is no check for existing issues with similar titles. If issue-sync runs multiple times (or multiple workers each create their own issue), duplicates accumulate.Gap 2 — Dispatch checks OPEN state but not related merged PRs. The pulse correctly skips CLOSED issues. But it does not check whether a merged PR already implements the same feature. A duplicate issue that was never linked to the merged PR stays OPEN and gets dispatched.
Proposed fixes
Issue creation dedup: before
gh issue createin issue-sync-helper.sh and claim-task-id.sh, rungh issue list --search "<title keywords>" --state alland skip creation if a semantically similar issue exists (open or recently closed).Pre-dispatch merged-PR check: in the pulse dispatch step, before assigning a worker, search for merged PRs that reference the issue's task keywords. If found, close the duplicate issue with a comment pointing to the merged PR instead of dispatching.
Single-issue-per-task enforcement: claim-task-id.sh should store the GH issue number atomically alongside the task ID claim, preventing a second claim from creating a second issue for the same task ID.
Evidence