Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ jobs:
tests/test_review_one_pr_ci_pending.bats \
tests/test_release_registry.bats \
tests/test_readme_refresh_helpers.bats \
tests/test_validate_personas.bats
tests/test_validate_personas.bats \
tests/test_dev_lead_concurrency_guard.bats

template-drift:
# Drift guard (#969): fail when a file committed in petry-projects/repo-template
Expand Down
27 changes: 27 additions & 0 deletions tests/test_dev_lead_concurrency_guard.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bats
# Regression guard for petry-projects/.github#443 (and #402/#450).
#
# The dev-lead issue-pickup race: GitHub fires one issues:labeled event per label
# added in a single API call. If the reusable's per-issue concurrency used
# cancel-in-progress:true, a later (non-dev-lead) labeled event could CANCEL the
# run triggered by the dev-lead label before it dispatched — a "successful"
# workflow that opened no PR. The fix (#450) is separate per-issue/per-PR lanes
# with cancel-in-progress: false, so same-lane events queue behind the active run
# and the pickup always finishes. These asserts fail loudly if anyone flips it back.
Comment thread
Copilot marked this conversation as resolved.

REUSABLE=".github/workflows/dev-lead-reusable.yml"

@test "dev-lead reusable concurrency is cancel-in-progress: false (#443/#450)" {
run grep -E '^[[:space:]]*cancel-in-progress:[[:space:]]*false[[:space:]]*$' "$REUSABLE"
[ "$status" -eq 0 ]
Comment thread
don-petry marked this conversation as resolved.
}
Comment thread
Copilot marked this conversation as resolved.

@test "dev-lead reusable has NO cancel-in-progress: true (would re-open the #443 race)" {
run grep -E '^[[:space:]]*cancel-in-progress:[[:space:]]*true[[:space:]]*$' "$REUSABLE"
[ "$status" -eq 1 ]
}

@test "dev-lead reusable routes issue events to a per-issue lane (#402 lanes)" {
run grep -F "format('dev-lead-issue-{0}', github.event.issue.number)" "$REUSABLE"
[ "$status" -eq 0 ]
}
Loading