repetitive comments
@worktrunk-bot diagnose and propose a fix for the repetitive comments in https://github.com/max-sixty/worktrunk/issues/1215
please ensure you read the logs etc
Diagnosis
The three near-identical comments in #1215 were caused by omerxx's comment being created and then edited twice in quick succession (the comment has includesCreatedEdit: true).
The workflow runs confirm this — three issue_comment events fired within ~40 seconds, all for the same comment:
| Run | Created | Trigger | Result |
|---|---|---|---|
| 22480574385 | 09:27:55 | issue_comment (created) |
success — posted comment |
| 22480592370 | 09:28:26 | issue_comment (edited) |
success — posted comment |
| 22480597562 | 09:28:35 | issue_comment (edited) |
success — posted comment |
All three passed the if condition (non-bot user), passed the verify step (bot had prior engagement on #1215), ran Claude, and each independently posted a response.
Root cause: claude-mention.yaml has no concurrency group — unlike claude-issue-triage.yaml which already has one. So when multiple events fire for the same issue (create + edits), they all run in parallel and each posts a response.
Proposed fix
Add a concurrency group to claude-mention.yaml:
concurrency:
group: ${{ github.workflow }}-${{ github.event.issue.number || github.event.pull_request.number }}
cancel-in-progress: true
This matches the pattern already used in claude-issue-triage.yaml. When a comment is created and then quickly edited, the edit event cancels the in-progress run from the create event, so only one response gets posted.
Want me to open a PR for this?