You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix a silent-exit bug in tests/dev-lead/integration/test_concurrency_config.sh that caused the concurrency-config job to fail with no diagnostic output when a workflow file's concurrency block was absent or contained only comment lines.
Root Cause
The test script uses set -euo pipefail. Inside check_concurrency_field and check_concurrency_order, the block-extraction pipeline is:
When the file has no concurrency block (or all lines are comments), grep -v receives no matching input and exits with code 1. With set -euo pipefail, that causes immediate script exit β no FAIL messages, no diagnostic output. The runner just saw exit code 1 with no explanation.
This is what happened on PR #488 (implementing issue #395: making dev-lead.yml non-stub): an early version of the PR's dev-lead.yml had no top-level concurrency block, causing the test to exit silently.
Implementation Checklist
tests/dev-lead/unit/test_concurrency_config.bats β new bats unit tests covering the missing-block and comment-only-block cases (TDD: written first, must fail before fix)
tests/dev-lead/integration/test_concurrency_config.sh β add || true to block=$(...) in both check_concurrency_field and check_concurrency_order so a missing/empty block falls through to a clear FAIL message
Tests to Write
block=$(pipeline): grep returns non-zero on empty input β script still prints FAIL message (check_concurrency_field with no concurrency block)
block=$(pipeline): comment-only block β each check prints FAIL message
Integration test test_concurrency_config.sh passes on current repo files
Root Cause
test_concurrency_config.sh uses set -euo pipefail. In both check_concurrency_field and check_concurrency_order, the block-extraction pipeline is:
block=$(awk '...'"$file"| grep -v '^\s*#')
When a workflow file has no concurrency block, awk produces no output. grep -v '^\s*#' on empty input finds no matching lines and exits with status 1. In non-interactive bash (i.e., when running as a script, not in a (subshell) or interactive mode), set -e triggers on this assignment β causing the script to exit before printing any FAIL message.
The same silent-exit happened for line_before=$(...) and line_after=$(...) in check_concurrency_order when the block is empty.
On PR #488's merge commit (commit 11ec55ff), the merge combined the old test (which expects both dev-lead.yml and dev-lead-reusable.yml to have concurrency blocks) with the PR's stub dev-lead.yml (no concurrency block). The test exited silently: GitHub Actions logged "Process completed with exit code 1" with zero diagnostic output β making the failure look like infra noise to the fleet monitor.
Test Results
1..4 (test_concurrency_config.bats β new)
ok 1 concurrency-config: exit 1 with FAIL output when dev-lead.yml has no concurrency block
ok 2 concurrency-config: exit 1 with FAIL output when dev-lead.yml concurrency block is comments-only
ok 3 concurrency-config: exit 1 with FAIL output when dev-lead-reusable.yml has no concurrency block
ok 4 concurrency-config: passes when both files have correct concurrency config
Full suite: 377/377 passing (0 failures)
Files Changed
tests/dev-lead/integration/test_concurrency_config.sh: Added || true to block=$(...) in check_concurrency_field and to block=$(...), line_before=$(...), line_after=$(...) in check_concurrency_order β prevents bash set -e from triggering when grep exits 1 on empty input; empty block now falls through to the existing FAIL-message branches.
tests/dev-lead/unit/test_concurrency_config.bats (new): 4 bats unit tests covering the regression scenarios.
Notes
The underlying PR #488 (issue #395: convert dev-lead.yml back to a stub) is still open. Whether that PR lands or not, the concurrency-config test will now produce clear diagnostic output instead of silently exiting whenever a workflow file lacks a concurrency block. Future failures in this test will be attributable rather than appearing as mystery infra failures.
Activity
don-petry commentedon Jun 9, 2026
don-petry commentedon Jun 9, 2026
Dev-Lead Implementation Plan
Issue: #512 β [Fleet Monitor] petry-projects/.github-private β test-dev-lead.yml
Scope
Fix a silent-exit bug in
tests/dev-lead/integration/test_concurrency_config.shthat caused theconcurrency-configjob to fail with no diagnostic output when a workflow file's concurrency block was absent or contained only comment lines.Root Cause
The test script uses
set -euo pipefail. Insidecheck_concurrency_fieldandcheck_concurrency_order, the block-extraction pipeline is:block=$(awk '/^concurrency:/{...}' "$file" | grep -v '^\s*#')When the file has no concurrency block (or all lines are comments),
grep -vreceives no matching input and exits with code 1. Withset -euo pipefail, that causes immediate script exit β no FAIL messages, no diagnostic output. The runner just saw exit code 1 with no explanation.This is what happened on PR #488 (implementing issue #395: making dev-lead.yml non-stub): an early version of the PR's dev-lead.yml had no top-level concurrency block, causing the test to exit silently.
Implementation Checklist
tests/dev-lead/unit/test_concurrency_config.batsβ new bats unit tests covering the missing-block and comment-only-block cases (TDD: written first, must fail before fix)tests/dev-lead/integration/test_concurrency_config.shβ add|| truetoblock=$(...)in bothcheck_concurrency_fieldandcheck_concurrency_orderso a missing/empty block falls through to a clear FAIL messageTests to Write
block=$(pipeline): grep returns non-zero on empty input β script still prints FAIL message(check_concurrency_field with no concurrency block)block=$(pipeline): comment-only block β each check prints FAIL messageTest Command
bats tests/dev-lead/unit/ --formatter tapdon-petry commentedon Jun 9, 2026
Dev-Lead: Implementation Complete
Plan Execution
test_concurrency_config.sh|| trueon all threegrep-based pipelines in the block-extraction functionsbash scripts/dev-lead-lint.shpassed (shellcheck + agent frontmatter)test_concurrency_config.shpasses on current repo filesRoot Cause
test_concurrency_config.shusesset -euo pipefail. In bothcheck_concurrency_fieldandcheck_concurrency_order, the block-extraction pipeline is:block=$(awk '...' "$file" | grep -v '^\s*#')When a workflow file has no concurrency block,
awkproduces no output.grep -v '^\s*#'on empty input finds no matching lines and exits with status 1. In non-interactive bash (i.e., when running as a script, not in a(subshell)or interactive mode),set -etriggers on this assignment β causing the script to exit before printing any FAIL message.The same silent-exit happened for
line_before=$(...)andline_after=$(...)incheck_concurrency_orderwhen the block is empty.On PR #488's merge commit (commit
11ec55ff), the merge combined the old test (which expects bothdev-lead.ymlanddev-lead-reusable.ymlto have concurrency blocks) with the PR's stubdev-lead.yml(no concurrency block). The test exited silently: GitHub Actions logged "Process completed with exit code 1" with zero diagnostic output β making the failure look like infra noise to the fleet monitor.Test Results
Files Changed
tests/dev-lead/integration/test_concurrency_config.sh: Added|| truetoblock=$(...)incheck_concurrency_fieldand toblock=$(...),line_before=$(...),line_after=$(...)incheck_concurrency_orderβ prevents bashset -efrom triggering whengrepexits 1 on empty input; empty block now falls through to the existing FAIL-message branches.tests/dev-lead/unit/test_concurrency_config.bats(new): 4 bats unit tests covering the regression scenarios.Notes
The underlying PR #488 (issue #395: convert dev-lead.yml back to a stub) is still open. Whether that PR lands or not, the concurrency-config test will now produce clear diagnostic output instead of silently exiting whenever a workflow file lacks a concurrency block. Future failures in this test will be attributable rather than appearing as mystery infra failures.
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
16 remaining items
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #512 β [Fleet Monitor] petry-projects/.github-pβ¦