-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
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
- Create a mock
ghthat always fails workflow dispatches. - 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 detectorsExpected 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 detectorsEvidence
- 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels