Repository navigation
fix(ci): skip claude-mention for bot-authored issues - #1429
Merged
Merged
Conversation
The hourly review workflow creates issues that incidentally mention @worktrunk-bot in body text (e.g., describing CI behavior). This triggers claude-mention on the issues event, which then duplicates the hourly review's fix work — including creating a second PR. Add an author check (github.event.issue.user.login != 'worktrunk-bot') to the issues trigger, consistent with the existing loop-prevention checks on comment events. Closes #1428 Co-Authored-By: Claude Opus 4.6 <[email protected]>
This was referenced Mar 10, 2026
max-sixty
pushed a commit
that referenced
this pull request
Mar 11, 2026
## Summary - Narrows the self-authored PR early-exit: skip only review posting (step 4) and thread resolution (step 6), but keep CI monitoring (step 5) - Removes the "done, stop here" instruction from step 5 that previously told the model to skip CI monitoring for silent self-authored PRs ## Context Run [22920083221](https://github.com/max-sixty/worktrunk/actions/runs/22920083221) spent ~9 minutes polling CI after correctly staying silent on self-authored PR #1429. The original fix skipped steps 4–6 entirely, but [review feedback](#1431 (comment)) correctly noted that CI monitoring is valuable for self-authored PRs — the bot can self-fix failures via step 7. Closes #1430 ## Test plan - [x] Verify the instruction reads naturally in context - [ ] Monitor next self-authored PR review to confirm the model monitors CI but skips posting 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: worktrunk-bot <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]>
max-sixty
pushed a commit
that referenced
this pull request
Mar 21, 2026
…ixes (#1548) ## Problem When a user both comments on an existing issue AND files a new issue within seconds (as happened with #1279/#1543), two independent workflows (`claude-mention` and `claude-issue-triage`) race to create fix PRs. This produced duplicate PRs #1544 and #1545, which modify the exact same 6 files with nearly identical changes. The review bot then reviewed both PRs independently and even posted misleading feedback on #1545 — flagging "missing" call site migrations in `src/llm.rs` and `src/commands/step_commands.rs` that PR #1544 already handles. **Evidence:** Run 23121388888 (review of #1545) posted a COMMENT suggesting files that the sibling PR #1544 already covers. Run 23121179226 (review of #1544) found no issues but didn't detect the duplication either. This is a variant of #1428 but affects user-triggered events (not bot-authored), so the existing bot-author filter from #1429 doesn't help. ## Fix Add a new **Step 2: Check for overlapping PRs** to the review-pr skill. Before reading the diff, the reviewer checks whether other open bot-authored PRs touch the same files. If overlap is found, it's flagged in the review so one can be closed as a duplicate. Also renumbers subsequent steps (3→4, 4→5, etc.) and updates internal cross-references. ## Why this approach - **Catches duplicates at review time** — the cheapest point to detect, since both PRs exist by then - **Doesn't require workflow coordination** — no locking or inter-workflow communication needed - **Low false-positive risk** — overlapping files on bot PRs with similar fixes is a strong signal The underlying race between triage and mention workflows remains (fixing that would require cross-workflow locking), but this ensures the reviewer surfaces the duplication for human action. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: worktrunk-bot <[email protected]> Co-authored-by: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
github.event.issue.user.login != 'worktrunk-bot'to theissuestrigger inclaude-mention.yaml.github/CLAUDE.md"Does not trigger" listProblem
The hourly review workflow creates issues (like #1424) that incidentally mention
@worktrunk-botin body text — e.g., "comment contained@worktrunk-bot". This triggersclaude-mentionon theissuesevent, which then duplicates the hourly review's work, including creating a second fix PR (#1425 vs #1426 for the same issue).Fix
Add an author check to skip issues created by
worktrunk-botitself, consistent with the existingcomment.user.login != 'worktrunk-bot'loop-prevention checks onissue_commentandpull_request_review_commentevents.Closes #1428
Test plan
if:condition syntax is valid (CI should pass)🤖 Generated with Claude Code