Skip to content

[bug-hunter] trigger-ci-workflows.sh reports success when all workflow dispatches fail #315

@github-actions

Description

@github-actions

Impact

Users running scripts/trigger-ci-workflows.sh can get a success-looking summary and zero exit status even when every gh workflow run call fails, so failed dispatches are easy to miss in CI/automation.

Reproduction Steps

  1. Create a mock gh that always fails workflow dispatches.
  2. Run the script against one category.

Commands used:

mkdir -p /tmp/gh-aw/agent/mockbin
cat > /tmp/gh-aw/agent/mockbin/gh <<'EOF'
#!/usr/bin/env bash
if [[ "$1" == "workflow" && "$2" == "run" ]]; then
  echo "mock gh: failed to dispatch $3" >&2
  exit 1
fi
exit 0
EOF
chmod +x /tmp/gh-aw/agent/mockbin/gh
PATH="/tmp/gh-aw/agent/mockbin:$PATH" bash scripts/trigger-ci-workflows.sh detectors

Expected vs Actual

Expected: Script exits non-zero (or at least reports failed dispatch counts) when dispatches fail.

Actual: Script exits 0 and prints a success-style summary:

## Detectors

  ✗ Trigger Breaking Change Detector (dispatch failed)
  ✗ Trigger Bug Hunter (dispatch failed)
  ✗ Trigger Docs Patrol (dispatch failed)
  ✗ Trigger Newbie Contributor Patrol (dispatch failed)
  ✗ Trigger Code Duplication Detector (dispatch failed)
  ✗ Trigger Stale Issues (dispatch failed)
  ✗ Trigger Text Auditor (dispatch failed)

Dispatched 7 workflows across 1 category(s).

Failing Test

Minimal repro script used above:

#!/usr/bin/env bash
set -euo pipefail
mkdir -p /tmp/gh-aw/agent/mockbin
cat > /tmp/gh-aw/agent/mockbin/gh <<'EOF'
#!/usr/bin/env bash
if [[ "$1" == "workflow" && "$2" == "run" ]]; then
  exit 1
fi
exit 0
EOF
chmod +x /tmp/gh-aw/agent/mockbin/gh
PATH="/tmp/gh-aw/agent/mockbin:$PATH" bash scripts/trigger-ci-workflows.sh detectors

Evidence

  • Dispatch failures are only printed and never affect exit status: scripts/trigger-ci-workflows.sh:122-130.
  • Summary is computed from category sizes, not successful dispatches: scripts/trigger-ci-workflows.sh:135-145.
  • Reproduction run exit code: 0.

What is this? | From workflow: Bug Hunter

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

  • expires on Feb 28, 2026, 7:43 AM UTC

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions