From 419852fd55d9fe00a5aa9a41ad63886a94ef3d73 Mon Sep 17 00:00:00 2001 From: prql-bot <107324867+prql-bot@users.noreply.github.com> Date: Mon, 31 Aug 2026 06:59:09 +0000 Subject: [PATCH] =?UTF-8?q?chore:=20update=20tend=20workflows=20(0.1.22=20?= =?UTF-8?q?=E2=86=92=200.1.24)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actionlint.yaml | 14 +++--- .github/workflows/tend-ci-fix.yaml | 6 +-- .github/workflows/tend-mention.yaml | 4 +- .github/workflows/tend-nightly.yaml | 6 +-- .github/workflows/tend-notifications.yaml | 61 +++++++++++++++++++---- .github/workflows/tend-review-runs.yaml | 6 +-- .github/workflows/tend-review.yaml | 8 +-- .github/workflows/tend-triage.yaml | 6 +-- .github/workflows/tend-weekly.yaml | 6 +-- 9 files changed, 79 insertions(+), 38 deletions(-) diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml index 66cab3e6d872..5c0a1909495f 100644 --- a/.github/actionlint.yaml +++ b/.github/actionlint.yaml @@ -6,12 +6,14 @@ self-hosted-runner: # actionlint does not yet know the `concurrency.queue` key, which GitHub added # and tend's generated `tend-review.yaml` uses. Upstream tracks it in # rhysd/actionlint#654 and #657; the PR adding support (#661) was closed -# unmerged and the latest release (v1.7.12) still rejects it, so the nightly -# `uvx tend init` regeneration would otherwise land permanently red here. +# unmerged and the latest release (v1.7.12) still rejects it, so without an +# ignore the nightly `uvx tend init` regeneration lands permanently red here. # -# Scoped to the generated `tend-*` workflows so a genuine typo in a -# hand-written workflow is still caught. Remove once actionlint ships support. +# `tend init` now writes the entry below itself (tend 0.1.23), so the +# equivalent entry #6252 added by hand is gone. It stays scoped to the +# generated `tend-*` workflows, so a genuine typo in a hand-written workflow +# is still caught. Remove once actionlint ships support. paths: - .github/workflows/tend-*.yaml: + "**/.github/workflows/tend-*.yaml": ignore: - - 'unexpected key "queue" for "concurrency" section' + - unexpected key "queue" for "concurrency" section diff --git a/.github/workflows/tend-ci-fix.yaml b/.github/workflows/tend-ci-fix.yaml index 79a896f03dea..3e75043c8325 100644 --- a/.github/workflows/tend-ci-fix.yaml +++ b/.github/workflows/tend-ci-fix.yaml @@ -1,4 +1,4 @@ -# Generated by tend 0.1.22. Regenerate with: uvx tend@latest init +# Generated by tend 0.1.24. 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, @@ -34,14 +34,14 @@ jobs: - uses: ./.github/actions/tend-setup - - uses: max-sixty/tend/claude@0.1.22 + - uses: max-sixty/tend/claude@0.1.24 with: github_token: ${{ secrets.TEND_BOT_TOKEN }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} bot_name: prql-bot model: opus - prompt: | + prompt: |2 /tend-ci-runner:ci-fix ${{ github.event.workflow_run.id }} - Run URL: ${{ github.event.workflow_run.html_url }} - Commit: ${{ github.event.workflow_run.head_sha }} diff --git a/.github/workflows/tend-mention.yaml b/.github/workflows/tend-mention.yaml index 223f8137e4ed..58888cd98fe6 100644 --- a/.github/workflows/tend-mention.yaml +++ b/.github/workflows/tend-mention.yaml @@ -1,4 +1,4 @@ -# Generated by tend 0.1.22. Regenerate with: uvx tend@latest init +# Generated by tend 0.1.24. 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, @@ -420,7 +420,7 @@ jobs: # the API record — the dispatch payload never carries one to spoof. EVENT_TS: ${{ github.event.comment.updated_at || needs.verify.outputs.ts || github.event.issue.updated_at }} - - uses: max-sixty/tend/claude@0.1.22 + - uses: max-sixty/tend/claude@0.1.24 with: github_token: ${{ secrets.TEND_BOT_TOKEN }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} diff --git a/.github/workflows/tend-nightly.yaml b/.github/workflows/tend-nightly.yaml index a905bc3cd178..47b8b5959ff2 100644 --- a/.github/workflows/tend-nightly.yaml +++ b/.github/workflows/tend-nightly.yaml @@ -1,4 +1,4 @@ -# Generated by tend 0.1.22. Regenerate with: uvx tend@latest init +# Generated by tend 0.1.24. 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, @@ -34,12 +34,12 @@ jobs: - uses: ./.github/actions/tend-setup - - uses: max-sixty/tend/claude@0.1.22 + - uses: max-sixty/tend/claude@0.1.24 with: github_token: ${{ secrets.TEND_BOT_TOKEN }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} bot_name: prql-bot model: opus - prompt: | + prompt: |2 /tend-ci-runner:nightly diff --git a/.github/workflows/tend-notifications.yaml b/.github/workflows/tend-notifications.yaml index 438a3eba5bfd..a5311ee3a957 100644 --- a/.github/workflows/tend-notifications.yaml +++ b/.github/workflows/tend-notifications.yaml @@ -1,4 +1,4 @@ -# Generated by tend 0.1.22. Regenerate with: uvx tend@latest init +# Generated by tend 0.1.24. 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, @@ -28,13 +28,13 @@ jobs: actions: read issues: write steps: - - name: Check for unread notifications + - name: Check for unread notifications and conflicted PRs id: check env: GITHUB_TOKEN: ${{ secrets.TEND_BOT_TOKEN }} run: | # shellcheck shell=bash - # Establish the repository's notification recovery queue and decide whether the + # Establish the repository's frequent maintenance queue and decide whether the # agent needs to boot. Inlined into the generated workflow: env in, # GITHUB_OUTPUT out. # @@ -69,14 +69,52 @@ jobs: echo "count=$COUNT" >> "$GITHUB_OUTPUT" - if [ "$COUNT" = "0" ]; then - echo "No notification work before $CUTOFF — skipping" + # GitHub computes mergeability lazily after the base moves. UNKNOWN therefore + # means "worth a synchronous local test", not "clean". This is only a cheap + # boot gate; the agent test-merges every candidate before changing a branch. + # Read the newest comments: a deferral is normally the PR's latest activity. + # An older marker can waste boots, but the resolver paginates before acting. + # shellcheck disable=SC2016 # $q is a GraphQL variable, not a shell variable. + if BOT_LOGIN=$(gh api user --jq .login 2>/dev/null) \ + && PRS=$(gh api graphql -f query=' + query($q: String!) { + search(query: $q, type: ISSUE, first: 100) { + nodes { ... on PullRequest { + mergeable headRefOid + comments(last: 100) { nodes { author { login } body } } + } } + } + }' -f q="repo:$GITHUB_REPOSITORY author:$BOT_LOGIN is:pr is:open" \ + --jq '.data.search.nodes' 2>/dev/null) \ + && CONFLICT_COUNT=$(jq -er --arg bot "$BOT_LOGIN" ' + [.[] + | select(.mergeable != "MERGEABLE") + | . as $pr + | "" as $marker + | select(any($pr.comments.nodes[]?; + .author.login == $bot + and (((.body // "") | sub("\\s+$"; "") | split("\n") | last) == $marker)) + | not)] + | length' <<<"$PRS"); then + : else - echo "$COUNT notification task(s) — proceeding" + CONFLICT_COUNT=0 + echo "::warning::bot PR conflict scan failed; retrying next cycle" + fi + + echo "conflict_count=$CONFLICT_COUNT" >> "$GITHUB_OUTPUT" + + if [ "$COUNT" = "0" ] && [ "$CONFLICT_COUNT" = "0" ]; then + echo "No notification or conflict work — skipping" + else + [ "$COUNT" = "0" ] || \ + echo "$COUNT notification task(s) — proceeding" + [ "$CONFLICT_COUNT" = "0" ] || \ + echo "$CONFLICT_COUNT possible conflicted bot PR(s) — proceeding" fi - uses: actions/checkout@v7 - if: steps.check.outputs.count != '0' || github.event_name == 'workflow_dispatch' + if: steps.check.outputs.count != '0' || steps.check.outputs.conflict_count != '0' || github.event_name == 'workflow_dispatch' with: ref: main fetch-depth: 0 @@ -84,16 +122,17 @@ jobs: token: ${{ secrets.TEND_BOT_TOKEN }} - uses: ./.github/actions/tend-setup - if: steps.check.outputs.count != '0' || github.event_name == 'workflow_dispatch' - - uses: max-sixty/tend/claude@0.1.22 - if: steps.check.outputs.count != '0' || github.event_name == 'workflow_dispatch' + if: steps.check.outputs.count != '0' || steps.check.outputs.conflict_count != '0' || github.event_name == 'workflow_dispatch' + - uses: max-sixty/tend/claude@0.1.24 + if: steps.check.outputs.count != '0' || steps.check.outputs.conflict_count != '0' || github.event_name == 'workflow_dispatch' with: github_token: ${{ secrets.TEND_BOT_TOKEN }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} bot_name: prql-bot model: opus - prompt: | + prompt: |2 /tend-ci-runner:notifications Notification snapshot cutoff: ${{ steps.check.outputs.cutoff }} + Possible conflicted bot PR count: ${{ steps.check.outputs.conflict_count }} diff --git a/.github/workflows/tend-review-runs.yaml b/.github/workflows/tend-review-runs.yaml index 67144ae4fe2b..4344e28dde3c 100644 --- a/.github/workflows/tend-review-runs.yaml +++ b/.github/workflows/tend-review-runs.yaml @@ -1,4 +1,4 @@ -# Generated by tend 0.1.22. Regenerate with: uvx tend@latest init +# Generated by tend 0.1.24. 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, @@ -34,12 +34,12 @@ jobs: - uses: ./.github/actions/tend-setup - - uses: max-sixty/tend/claude@0.1.22 + - uses: max-sixty/tend/claude@0.1.24 with: github_token: ${{ secrets.TEND_BOT_TOKEN }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} bot_name: prql-bot model: opus - prompt: | + prompt: |2 /tend-ci-runner:review-runs diff --git a/.github/workflows/tend-review.yaml b/.github/workflows/tend-review.yaml index d444750fac7c..d41fa4a0165b 100644 --- a/.github/workflows/tend-review.yaml +++ b/.github/workflows/tend-review.yaml @@ -1,4 +1,4 @@ -# Generated by tend 0.1.22. Regenerate with: uvx tend@latest init +# Generated by tend 0.1.24. 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, @@ -77,15 +77,15 @@ jobs: fetch-tags: true token: ${{ secrets.TEND_BOT_TOKEN }} - - uses: max-sixty/tend/claude@0.1.22 + - uses: max-sixty/tend/claude@0.1.24 with: github_token: ${{ secrets.TEND_BOT_TOKEN }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} bot_name: prql-bot model: opus - prompt: >- - ${{ format('/tend-ci-runner:review {0}', github.event.pull_request.number) }} + prompt: |2 + /tend-ci-runner:review ${{ github.event.pull_request.number }} - name: Restore local setup actions for POST cleanup if: always() diff --git a/.github/workflows/tend-triage.yaml b/.github/workflows/tend-triage.yaml index 0eb184285398..ece079ec6041 100644 --- a/.github/workflows/tend-triage.yaml +++ b/.github/workflows/tend-triage.yaml @@ -1,4 +1,4 @@ -# Generated by tend 0.1.22. Regenerate with: uvx tend@latest init +# Generated by tend 0.1.24. 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, @@ -46,14 +46,14 @@ jobs: - uses: ./.github/actions/tend-setup - - uses: max-sixty/tend/claude@0.1.22 + - uses: max-sixty/tend/claude@0.1.24 with: github_token: ${{ secrets.TEND_BOT_TOKEN }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} bot_name: prql-bot model: opus - prompt: | + prompt: |2 /tend-ci-runner:triage ${{ github.event.issue.number }} - name: Remove the eyes reaction diff --git a/.github/workflows/tend-weekly.yaml b/.github/workflows/tend-weekly.yaml index ac1522aa2547..9d2f747c71ce 100644 --- a/.github/workflows/tend-weekly.yaml +++ b/.github/workflows/tend-weekly.yaml @@ -1,4 +1,4 @@ -# Generated by tend 0.1.22. Regenerate with: uvx tend@latest init +# Generated by tend 0.1.24. 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, @@ -34,12 +34,12 @@ jobs: - uses: ./.github/actions/tend-setup - - uses: max-sixty/tend/claude@0.1.22 + - uses: max-sixty/tend/claude@0.1.24 with: github_token: ${{ secrets.TEND_BOT_TOKEN }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} bot_name: prql-bot model: opus - prompt: | + prompt: |2 /tend-ci-runner:weekly