Skip to content

ci: proposal — notify #team-alpha on merge-train/spartan MQ failures#23242

Closed
AztecBot wants to merge 1 commit into
merge-train/spartanfrom
claudebox/spartan-mq-fail-notifications
Closed

ci: proposal — notify #team-alpha on merge-train/spartan MQ failures#23242
AztecBot wants to merge 1 commit into
merge-train/spartanfrom
claudebox/spartan-mq-fail-notifications

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

Summary

Proposal (not directly applied) to add a Slack notification to #team-alpha (C0AU8BULZHC) whenever the CI3 job fails for merge-train/spartan in the merge queue.

The ClaudeBox session was not started with ci-allow, so .github/ edits were blocked. The patch is dropped in .github-new/workflows/ci3-spartan-mq-notify.md for someone to apply manually (or rerun the request prefixed with ci-allow).

Why

Today the only failure notification for merge-train/spartan in the MQ is merge-queue-dequeue-notify.yml, which fires on the pull_request: dequeued event. If GitHub's merge queue retries and the retry succeeds, that event never fires and the team gets no signal about the underlying flake/failure.

Patch (also embedded in the proposal file)

Add this step to the ci job in .github/workflows/ci3.yml, immediately after the existing Notify Slack on backport CI failure step:

      # Fires on every merge-queue CI failure for merge-train/spartan, not just on dequeue
      # (the queue may retry, so merge-queue-dequeue-notify.yml alone misses individual failures).
      # CI_MODE=merge-queue-heavy is only set for merge-train/spartan in the merge queue
      # (see .github/ci3_labels_to_env.sh).
      - name: Notify Slack on merge-train/spartan merge-queue failure
        if: failure() && env.CI_MODE == 'merge-queue-heavy'
        env:
          SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
          RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
        run: |
          if [ -n "${SLACK_BOT_TOKEN}" ]; then
            TEXT="CI3 failed in merge queue for *merge-train/spartan*: <${RUN_URL}|View Run>"
            curl -X POST https://slack.com/api/chat.postMessage \
              -H "Authorization: Bearer $SLACK_BOT_TOKEN" \
              -H "Content-type: application/json" \
              --data "$(jq -n --arg c "C0AU8BULZHC" --arg t "$TEXT" '{channel:$c, text:$t}')"
          fi

Detection

env.CI_MODE == 'merge-queue-heavy' is set by .github/ci3_labels_to_env.sh only when a merge_group event corresponds to a PR whose head branch is merge-train/spartan. Other MQ runs use CI_MODE=merge-queue and won't trigger this notification.

Test plan

  • After applying, wait for a merge-train/spartan PR to fail in the MQ and confirm a notification arrives in #team-alpha.
  • Verify non-spartan merge-queue runs do not post to this channel.

ClaudeBox log: https://claudebox.work/s/59af479c755d74ef?run=1

@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels May 13, 2026
@alexghr alexghr closed this May 13, 2026
@alexghr alexghr deleted the claudebox/spartan-mq-fail-notifications branch May 13, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants