diff --git a/.github/workflows/tend-ci-fix.yaml b/.github/workflows/tend-ci-fix.yaml index bec6f86ce0df..be674c5769ed 100644 --- a/.github/workflows/tend-ci-fix.yaml +++ b/.github/workflows/tend-ci-fix.yaml @@ -1,4 +1,4 @@ -# Generated by tend 0.1.10. Regenerate with: uvx tend@latest init +# Generated by tend 0.1.11. Regenerate with: uvx tend@latest init # # Do not edit this file directly — it will be overwritten on regeneration. # To customize behavior, edit the relevant skill (for example, @@ -32,7 +32,7 @@ jobs: - uses: ./.github/actions/tend-setup - - uses: max-sixty/tend/claude@0.1.10 + - uses: max-sixty/tend/claude@0.1.11 with: github_token: ${{ secrets.TEND_BOT_TOKEN }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} diff --git a/.github/workflows/tend-mention.yaml b/.github/workflows/tend-mention.yaml index 432a330f5977..49d5620cae13 100644 --- a/.github/workflows/tend-mention.yaml +++ b/.github/workflows/tend-mention.yaml @@ -1,4 +1,4 @@ -# Generated by tend 0.1.10. Regenerate with: uvx tend@latest init +# Generated by tend 0.1.11. Regenerate with: uvx tend@latest init # # Do not edit this file directly — it will be overwritten on regeneration. # To customize behavior, edit the relevant skill (for example, @@ -62,6 +62,29 @@ jobs: exit 0 fi + # Skip the bot's own comments before anything else. The Bot-type + # check below only catches GitHub App / Bot accounts; our own bot is a + # PAT-based User account, so its comments would otherwise fall through + # to the engagement heuristics (bot-authored issue, "bot has prior + # comments") and spin up a handle job the prompt's self-loop guard + # then exits silently — pure waste. There is no legitimate + # self-summons: a bot comment that quotes a prior @-mention would + # re-match the mention check below and escape an after-placed guard, + # so this runs *before* the mention check. Covers issue_comment and + # pull_request_review_comment (both carry comment.user.login). Fires + # on, e.g., the monthly tracking-issue rollover where the bot posts + # evidence-gist links on its own issue. Scoped to comments on + # purpose: the pull_request_review *submission* event is deliberately + # left out, since a review the bot leaves on its own PR is its + # reviewer role (the prompt is told to action it), not a self-loop. + # The only self-review skip is the terminal empty-body APPROVED gate + # below. + if { [ "$EVENT_NAME" = "issue_comment" ] || [ "$EVENT_NAME" = "pull_request_review_comment" ]; } \ + && [ "$COMMENT_AUTHOR" = "prql-bot" ]; then + echo "should_run=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + if [ -n "$COMMENT_BODY" ] && printf '%s\n' "$COMMENT_BODY" | grep -qF '@prql-bot'; then echo "should_run=true" >> "$GITHUB_OUTPUT" exit 0 @@ -156,6 +179,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.TEND_BOT_TOKEN }} EVENT_NAME: ${{ github.event_name }} COMMENT_BODY: ${{ github.event.comment.body || github.event.review.body }} + COMMENT_AUTHOR: ${{ github.event.comment.user.login }} COMMENT_AUTHOR_TYPE: ${{ github.event.comment.user.type }} ISSUE_BODY: ${{ github.event.issue.body }} ISSUE_OR_PR_NUMBER: ${{ github.event.issue.number }} @@ -229,7 +253,7 @@ jobs: env: EVENT_TS: ${{ github.event.comment.updated_at || github.event.review.submitted_at || github.event.issue.updated_at }} - - uses: max-sixty/tend/claude@0.1.10 + - uses: max-sixty/tend/claude@0.1.11 with: github_token: ${{ secrets.TEND_BOT_TOKEN }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} @@ -252,7 +276,7 @@ jobs: || (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@prql-bot') && format('A review was submitted on PR #{0} that mentions you ({1}, review ID {2}). Read the review and full context, then respond. If changes were requested, make them, commit, and push.', github.event.pull_request.number, github.event.review.html_url, github.event.review.id)) || (github.event_name == 'pull_request_review' - && format('A review was submitted on a PR where you previously participated (PR #{0}, {1}, review ID {2}). Read the review and full context. If the review requests changes or asks questions, respond appropriately. If the review approves or is between humans, exit silently.', github.event.pull_request.number, github.event.review.html_url, github.event.review.id)) + && format('A review was submitted on a PR where you previously participated (PR #{0}, {1}, review ID {2}). Read the review and full context. If it requests changes or asks questions, respond appropriately — including when you authored the review: a review your review workflow left on your own PR is your reviewer role speaking, not a self-loop, so action it. Exit silently for a plain approval, a review with no actionable content, or one between other participants.', github.event.pull_request.number, github.event.review.html_url, github.event.review.id)) || (contains(github.event.comment.body, '@prql-bot') && format('You were mentioned in a comment ({0}). Read the full context and respond. If changes are requested, make them, commit, and push.', github.event.comment.html_url)) || format('A user commented on an issue/PR where you previously participated ({0}). Read the full context. Only respond if the comment is directed at you, asks a question you can help with, or requests changes you can make. If the conversation is between other participants, exit silently.', github.event.comment.html_url) diff --git a/.github/workflows/tend-nightly.yaml b/.github/workflows/tend-nightly.yaml index 66c5417526c0..d08755dc058a 100644 --- a/.github/workflows/tend-nightly.yaml +++ b/.github/workflows/tend-nightly.yaml @@ -1,4 +1,4 @@ -# Generated by tend 0.1.10. Regenerate with: uvx tend@latest init +# Generated by tend 0.1.11. Regenerate with: uvx tend@latest init # # Do not edit this file directly — it will be overwritten on regeneration. # To customize behavior, edit the relevant skill (for example, @@ -32,7 +32,7 @@ jobs: - uses: ./.github/actions/tend-setup - - uses: max-sixty/tend/claude@0.1.10 + - uses: max-sixty/tend/claude@0.1.11 with: github_token: ${{ secrets.TEND_BOT_TOKEN }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} diff --git a/.github/workflows/tend-notifications.yaml b/.github/workflows/tend-notifications.yaml index 6555b22d1e90..efd9b28b7780 100644 --- a/.github/workflows/tend-notifications.yaml +++ b/.github/workflows/tend-notifications.yaml @@ -1,4 +1,4 @@ -# Generated by tend 0.1.10. Regenerate with: uvx tend@latest init +# Generated by tend 0.1.11. Regenerate with: uvx tend@latest init # # Do not edit this file directly — it will be overwritten on regeneration. # To customize behavior, edit the relevant skill (for example, @@ -99,7 +99,7 @@ jobs: - uses: ./.github/actions/tend-setup if: steps.check.outputs.count != '0' || github.event_name == 'workflow_dispatch' - - uses: max-sixty/tend/claude@0.1.10 + - uses: max-sixty/tend/claude@0.1.11 if: steps.check.outputs.count != '0' || github.event_name == 'workflow_dispatch' with: github_token: ${{ secrets.TEND_BOT_TOKEN }} diff --git a/.github/workflows/tend-review-runs.yaml b/.github/workflows/tend-review-runs.yaml index 4d5e66512204..3f5e99a03fef 100644 --- a/.github/workflows/tend-review-runs.yaml +++ b/.github/workflows/tend-review-runs.yaml @@ -1,4 +1,4 @@ -# Generated by tend 0.1.10. Regenerate with: uvx tend@latest init +# Generated by tend 0.1.11. Regenerate with: uvx tend@latest init # # Do not edit this file directly — it will be overwritten on regeneration. # To customize behavior, edit the relevant skill (for example, @@ -32,7 +32,7 @@ jobs: - uses: ./.github/actions/tend-setup - - uses: max-sixty/tend/claude@0.1.10 + - uses: max-sixty/tend/claude@0.1.11 with: github_token: ${{ secrets.TEND_BOT_TOKEN }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} diff --git a/.github/workflows/tend-review.yaml b/.github/workflows/tend-review.yaml index 0ace8c502d05..3a408820476f 100644 --- a/.github/workflows/tend-review.yaml +++ b/.github/workflows/tend-review.yaml @@ -1,4 +1,4 @@ -# Generated by tend 0.1.10. Regenerate with: uvx tend@latest init +# Generated by tend 0.1.11. Regenerate with: uvx tend@latest init # # Do not edit this file directly — it will be overwritten on regeneration. # To customize behavior, edit the relevant skill (for example, @@ -51,7 +51,7 @@ jobs: - uses: ./.github/actions/tend-setup - - uses: max-sixty/tend/claude@0.1.10 + - uses: max-sixty/tend/claude@0.1.11 with: github_token: ${{ secrets.TEND_BOT_TOKEN }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} diff --git a/.github/workflows/tend-triage.yaml b/.github/workflows/tend-triage.yaml index be1b35ea3fc5..cad38c9b6224 100644 --- a/.github/workflows/tend-triage.yaml +++ b/.github/workflows/tend-triage.yaml @@ -1,4 +1,4 @@ -# Generated by tend 0.1.10. Regenerate with: uvx tend@latest init +# Generated by tend 0.1.11. Regenerate with: uvx tend@latest init # # Do not edit this file directly — it will be overwritten on regeneration. # To customize behavior, edit the relevant skill (for example, @@ -35,7 +35,7 @@ jobs: - uses: ./.github/actions/tend-setup - - uses: max-sixty/tend/claude@0.1.10 + - uses: max-sixty/tend/claude@0.1.11 with: github_token: ${{ secrets.TEND_BOT_TOKEN }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} diff --git a/.github/workflows/tend-weekly.yaml b/.github/workflows/tend-weekly.yaml index 7d79f827aa2c..c17cda907e76 100644 --- a/.github/workflows/tend-weekly.yaml +++ b/.github/workflows/tend-weekly.yaml @@ -1,4 +1,4 @@ -# Generated by tend 0.1.10. Regenerate with: uvx tend@latest init +# Generated by tend 0.1.11. Regenerate with: uvx tend@latest init # # Do not edit this file directly — it will be overwritten on regeneration. # To customize behavior, edit the relevant skill (for example, @@ -32,7 +32,7 @@ jobs: - uses: ./.github/actions/tend-setup - - uses: max-sixty/tend/claude@0.1.10 + - uses: max-sixty/tend/claude@0.1.11 with: github_token: ${{ secrets.TEND_BOT_TOKEN }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}