Skip to content

fix(workflows): remove bot-author filter from mention and triage - #168

Merged
max-sixty merged 2 commits into
mainfrom
fix/remove-bot-author-filter
Apr 7, 2026
Merged

max-sixty merged 2 commits into
mainfrom
fix/remove-bot-author-filter

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

Summary

  • Remove user.login != bot checks from the tend-mention verify job's if condition, so bot-authored events (reviews, comments) pass through to the engagement-check script
  • Remove the bot-author filter from tend-triage so bot-created issues also get triaged
  • The agent's existing "exit silently if already responded" prompt guidance and the cancel-in-progress: false concurrency group provide loop prevention

Test plan

  • All 112 existing tests pass
  • Generated YAML parses correctly and verify if no longer references user.login
  • Triage job no longer has a job-level if

Closes #166

🤖 Generated with Claude Code

…flows

The job-level `if` on tend-mention's verify job excluded all events from
the bot account, preventing the bot from acting on reviews of its own PRs.
Remove the `user.login != bot` checks so bot-authored events pass through
to the verify step's engagement logic. The agent's existing "exit silently
if already responded" guidance and the concurrency group provide loop
prevention.

Also remove the bot-author filter from tend-triage so bot-created issues
(like analysis/proposal issues) get triaged.

Closes #166

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@max-sixty

Copy link
Copy Markdown
Owner

great!

I think we should retain the issue comment exclusion, because in that case there is no dialog between a reviewer and an implementer.

We should also add something to the mention skill that says it should be wary of responding to itself in cases where there is no distinct role (such as a reviewer).

…ance

Restore the bot-author exclusion for issue_comment events since there is
no reviewer/implementer dialog in that context. Add prompt guidance for
the agent to avoid self-conversation loops when there is no distinct
role boundary.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@tend-agent

Copy link
Copy Markdown
Collaborator Author

Good call on both points. Pushed a commit that:

  1. Restores the bot-author filter for issue_comment — the if condition now excludes github.event.comment.user.login != '<bot>' for issue_comment events, while still allowing pull_request_review and pull_request_review_comment through unfiltered.

  2. Adds self-response guidance to the mention prompt — instructs the agent to only respond to its own prior comments/reviews when there's a distinct role boundary (e.g., reviewer on its own PR), and to exit silently otherwise to avoid self-conversation loops.

@max-sixty
max-sixty merged commit ffc84f4 into main Apr 7, 2026
3 checks passed
@max-sixty
max-sixty deleted the fix/remove-bot-author-filter branch April 7, 2026 21:46
worktrunk-bot added a commit to max-sixty/worktrunk that referenced this pull request Apr 8, 2026
Picks up the fix from max-sixty/tend#168, which removes bot-author
filters from pull_request_review and pull_request_review_comment events
in the mention workflow. This allows the bot to process its own review
suggestions on bot-authored PRs, with self-conversation loop prevention
handled at the prompt level.

Also removes the bot-author filter from triage and adds "do not edit"
header comments to all generated workflow files.

Updates .github/CLAUDE.md to reflect the new loop prevention model.

Closes #2008

Co-Authored-By: Claude <[email protected]>
max-sixty pushed a commit to max-sixty/worktrunk that referenced this pull request Apr 8, 2026
## Problem

The tend workflow files were generated from an older version of `tend`
that includes bot-author filters on `pull_request_review` and
`pull_request_review_comment` events. This prevents `tend-mention` from
triggering when the bot reviews its own PR, so review suggestions sit
unapplied until a human intervenes (as happened on #2004).

The upstream fix (max-sixty/tend#168) was merged but hasn't been
released to PyPI yet, so `uvx tend@latest init` still generates the old
templates.

## Solution

Regenerated workflow files from `tend@main` (commit `ffc84f49`) which
includes the fix. Key changes:

- **tend-mention.yaml**: Removes `!= 'worktrunk-bot'` filters from
`pull_request_review` and `pull_request_review_comment` events.
Self-conversation loop prevention is now handled at the prompt level
instead.
- **tend-triage.yaml**: Removes `if: github.event.issue.user.login !=
'worktrunk-bot'` filter.
- **All files**: Adds "do not edit" header comments.
- **.github/CLAUDE.md**: Updated to reflect the new loop prevention
model.

## Testing

These are generated workflow files — no code tests needed. The changes
match the upstream template exactly (`uvx --from
'git+https://github.com/max-sixty/tend.git@main#subdirectory=generator'
tend init`).

---
Closes #2008 — automated triage

Co-authored-by: worktrunk-bot <[email protected]>
Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow tend-mention to trigger on bot's own reviews

2 participants