ci: add merge_group trigger to required-check workflows - #58
Conversation
Adds a `merge_group` trigger to the four required-check workflows so each required context reports inside the merge queue. Part of the org-wide merge-queue stall remediation. A required merge queue stalls when required-check workflows do not trigger on the merge_group event; the queue dispatches merge_group, waits for checks that never report, and times out. See reference-library PR #64 for the reference fix. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 30 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Auto-merge disabled on this pending review; not closing it, and no work here is lost. This PR adds
Net effect: instead of the current failure mode, where the merge group waits out the 60 minute A revised version is being prepared that adds the same triggers and additionally guards the PR-metadata jobs with Re-arm or supersede once that lands. |
The concurrency group for pr-validation.yml was keyed solely on github.event.pull_request.number, which is null under the merge_group event. Every merge-group build for this workflow would collapse into the same group key, so unrelated merge-group runs could cancel each other via cancel-in-progress, producing flaky-looking merge queue behavior with no visible error. Add a github.ref fallback, matching the pattern already used in this repo's ci.yml and security-analysis.yml concurrency groups. Audited the rest of this workflow for merge_group hazards: dead-code (vulture) has no PR-field references. supplemental-checks calls the org-level python-supplemental-checks.yml reusable workflow with enable-changelog-check and enable-link-check; changelog-check in that workflow already gates on github.event_name == 'pull_request' (the per-PR CHANGELOG.md check was deprecated to a no-op precisely because it conflicted in this org's ALLGREEN merge queue, per prior work), and link-check has no PR-specific fields and this repo sets link-check-fail: false, so neither can fail this gate under merge_group. validate-dependencies (the required Dependency & Standards Validation context) therefore needs no skip-tolerance change here, unlike repos with locally duplicated PR-title/PR-body jobs. Builds on #58 (claude/merge-queue-merge-group-0), which added the missing merge_group trigger to the four workflows that emit this repo's required status-check contexts (CI Gate, Check REUSE Compliance, Dependency & Standards Validation, Security Gate Validation, already correctly bare-named with no naming mismatch) but left this concurrency group unguarded. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
There was a problem hiding this comment.
🟢 Approval recommended
The changes are minimal, valid for GitHub Actions syntax, and directly address required-check reporting and concurrency behavior under merge_group.
Pull request overview
Enables GitHub merge queue (merge_group) runs for the workflows that emit this repo’s required status checks, ensuring required contexts report during merge-group builds and preventing merge-queue timeouts/ejections.
Changes:
- Added
merge_group:trigger to required-check workflows (ci.yml,reuse.yml,security-analysis.yml,pr-validation.yml). - Updated
pr-validation.ymlconcurrency group to fall back togithub.refwhengithub.event.pull_request.numberis null undermerge_group, avoiding cross-run cancellation.
File summaries
| File | Description |
|---|---|
| .github/workflows/ci.yml | Adds merge_group so the CI Gate check reports for merge queue builds. |
| .github/workflows/reuse.yml | Adds merge_group so REUSE compliance reports for merge queue builds. |
| .github/workflows/security-analysis.yml | Adds merge_group so the security gate required check reports for merge queue builds. |
| .github/workflows/pr-validation.yml | Adds merge_group and fixes concurrency grouping for merge-queue safety. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.







Problem
This repository's
merge_queueruleset requires four status checks(
CI Gate,Check REUSE Compliance,Dependency & Standards Validation,Security Gate Validation) withgrouping_strategy: ALLGREENand a60 minute response timeout, but none of the workflows that emit those
checks had a
merge_group:trigger. A merge-group build never dispatchesthose workflows, so the required contexts never report, every queue entry
waits out the 60 minute timeout, and gets ejected
UNMERGEABLE. Withoutthis fix the merge queue can never merge anything.
Workflows changed and why
.github/workflows/ci.yml: addedmerge_group:. Jobci(name:CI Gate) is the emitter. Concurrency group already had a|| github.reffallback. No hazards..github/workflows/reuse.yml: addedmerge_group:. Jobreuse(name:Check REUSE Compliance) is the emitter; theon:block isdeliberately unfiltered (no
paths:) so this required check reports onevery PR; no concurrency block, no PR-field references. Safe as-is.
.github/workflows/security-analysis.yml: addedmerge_group:. Jobsecurity-gate-success(name:Security Gate Validation) is already anormal job, not a reusable-workflow caller, so it was already correctly
bare-named with no naming mismatch (unlike the bug found in several
other repos in this batch). Concurrency already had a
|| github.reffallback. No hazards.
.github/workflows/pr-validation.yml: addedmerge_group:. Jobvalidate-dependencies(name:Dependency & Standards Validation) isthe emitter, gated on
needs: [supplemental-checks, dead-code]with areal
exit 1only whensupplemental-checksfails. Audited bothupstream jobs:
dead-code(vulture scan) has no PR-field references and is safe.supplemental-checkscalls the org-levelpython-supplemental-checks.ymlreusable workflow withenable-changelog-check: trueandenable-link-check: true. Readthat workflow directly: its
changelog-checkjob already gates ongithub.event_name == 'pull_request'(the per-PRCHANGELOG.mdeditrequirement was deprecated to a no-op specifically because it
conflicted with this org's ALLGREEN merge queue, per prior work), so
it reports
skippedunder merge_group rather than running orfailing.
link-checkhas no PR-specific fields and this repo setslink-check-fail: false, so it cannot fail this gate either way.cruft-check,automerge, andcommit-lintare all disabled viainput in this repo's call and never run. The reusable workflow's own
summary job is a pure report, no gating. Given all of this,
supplemental-checksreportssuccessunder merge_group with noguard changes needed, unlike repos with locally duplicated
PR-title/PR-body jobs, so no skip-tolerance change was needed in
validate-dependencieshere.This PR does fix one real hazard: the concurrency group was keyed
solely on
github.event.pull_request.number, null under merge_group,which would collapse every merge-group build for this workflow into one
group and risk cross-cancellation via
cancel-in-progress: true. Addeda
|| github.reffallback, matching the pattern already used in thisrepo's
ci.ymlandsecurity-analysis.yml.There is no PR title/body validation job among this repo's required
contexts.
Hazards audited
if: github.event_name == 'pull_request'guards on arequired-context job: none needed; the one job that reads PR-specific
fields transitively (
changelog-check, inside the shared org reusableworkflow) already has the correct guard.
github.event.pull_request.*/github.base_refreferences: foundonly inside the shared
python-supplemental-checks.ymlreusableworkflow (
changelog-check's label checks, already guarded), none inthis repo's own four required-context workflows.
concurrency:groups keyed on the PR ref that could collapse undermerge_group: found and fixed in
pr-validation.yml;ci.ymlandsecurity-analysis.ymlalready had the correct fallback.Verification
actionlintrun againstpr-validation.yml: identical finding countbefore and after (24 pre-existing shellcheck notices in an untouched
run:block, verified viagit stash).yamllintrun againstpr-validation.yml: no findings.pre-commit run --files .github/workflows/pr-validation.yml: allapplicable hooks passed.
emitter now runs on both
pull_requestandmerge_group.Other open PRs touching these files
chore/merge-queue-triggers): naivemerge_group:-only add acrossall four files; does not fix the
pr-validation.ymlconcurrencyfallback. Recommend closing in favor of this PR.
ci/migrate-off-changelog-check-gate) and ci: retire deprecated per-PR changelog gate #63(
claude/retire-changelog-gate-0): both address migrating this repo offenable-changelog-checktowardenable-commit-lint/semantic-release,the same deprecated changelog gate discussed above. Neither touches
merge_grouptriggers. Independent of this PR; no conflict expectedsince this PR only adds a trigger and a concurrency fallback, not a
change to the
supplemental-checkswith:block.ci/drop-ghas): unrelated scope (GHAS removal); not evaluatedhere.
Generated with Claude Code