worktrunk icon indicating copy to clipboard operation
worktrunk copied to clipboard

repetitive comments

Open max-sixty opened this issue 9 months ago • 1 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

max-sixty avatar Feb 27 '26 15:02 max-sixty

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?

worktrunk-bot avatar Feb 27 '26 15:02 worktrunk-bot