Repository navigation
feat(workflow-templates): add merge_group trigger for GitHub merge queue - #163
Conversation
Add unfiltered merge_group: trigger to python-ci.yml, python-security- analysis.yml, and python-sonarcloud.yml so the queue's speculative merge commit produces the same required status checks that PRs do. Without this, repos that enable merge_queue cannot land PRs that list these workflows as required status checks. The trigger is inert until merge_queue is enabled in the repo's branch ruleset (see CI-040). python-pr-validation.yml is intentionally excluded because the reusable workflow it calls is deprecated and slated for removal. Refs #154 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 52 minutes and 55 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
✨ 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 |
There was a problem hiding this comment.
Pull request overview
This PR updates the org’s reusable GitHub Actions workflow templates to support GitHub merge queue by adding the merge_group event trigger, so required status checks can be produced for speculative merge commits in consumer repositories.
Changes:
- Add
merge_group:trigger to the Python CI workflow template. - Add
merge_group:trigger to the Python Security Analysis workflow template. - Add
merge_group:trigger to the Python SonarCloud workflow template.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| workflow-templates/python-ci.yml | Adds merge_group trigger so CI required checks can run for merge queue refs. |
| workflow-templates/python-security-analysis.yml | Adds merge_group trigger so security checks can run for merge queue refs. |
| workflow-templates/python-sonarcloud.yml | Adds merge_group trigger so SonarCloud analysis can run for merge queue refs. |
| # CRITICAL: merge_group fires against the queue's speculative merge commit. | ||
| # Security gate must run on the queue ref so vulnerabilities introduced by | ||
| # the speculative merge are caught before landing on main. See CI-040. | ||
| merge_group: |
| # CRITICAL: merge_group fires against the queue's speculative merge commit. | ||
| # Security gate must run on the queue ref so vulnerabilities introduced by | ||
| # the speculative merge are caught before landing on main. See CI-040. | ||
| merge_group: |
| # CRITICAL: merge_group fires against the queue's speculative merge commit. | ||
| # SonarCloud quality gate must run on the queue ref to prevent regressions | ||
| # that only surface when concurrent PRs are merged together. See CI-040. | ||
| merge_group: |
PR ReviewStatus: CI green (23/23), SonarCloud quality gate PASSED (0 new issues, 0 hotspots). CodeRabbit rate-limited (org out of credits); Copilot not auto-requested. Agent findings: 0 Critical / 1 Important / 2 Suggested / 2 Informational. Important (should fix)
Suggested (consider addressing)
Informational
Recommended Action
CodeRabbit review request failed (rate limit); rerun via Generated with Claude Code |
|
✅ Actions performedReview triggered.
|
…templates Extends the merge_group: trigger rollout (initial 3 templates landed in the same PR) to the remaining PR-gated workflow templates so consumer repos can satisfy required-status-check policies under merge_queue regardless of which template they list as required: - python-cifuzzy.yml - python-compatibility.yml - python-container-security.yml - python-docs.yml - python-fips-compatibility.yml - python-reuse.yml For templates that gate push/pull_request on paths: filters (container- security, docs, fips-compatibility), the merge_group: trigger is added without a paths: filter. The queue's speculative merge ref reflects a full merge from base, so path-based skipping is unreliable on the queue ref; running unconditionally on merge_group: ensures the required check emits even when no path-filtered file changed. python-pr-validation.yml remains intentionally excluded (deprecated, slated for removal per the existing PR scope decision). Refs #154 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds a single Unreleased / Added entry covering the merge_group: trigger rollout to all 9 PR-gated workflow templates (3 from the original PR scope + 6 expanded in the prior commit). The entry summarizes the required-status-check rationale, notes the additive/inert nature of the trigger, and explains the python-pr-validation.yml exclusion. Required by CLAUDE.md: feat/fix/perf/breaking commits update CHANGELOG.md. Refs #154 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
PR Fix SummaryAddressed pr-review findings; pushed 2 commits. Important (resolved)
Suggested (resolved, expanded scope per maintainer decision)
Informational (dismissed)
Pre-commit local check: clean (yamllint, markdownlint, no-em-dash, detect-secrets, trufflehog, commitizen). CI re-run triggered by push. CodeRabbit was rate-limited on the original push; trigger a fresh review via 🤖 Generated with Claude Code |
|
The rationale for running Triggering a fresh incremental review against the two new commits now. ✅ Actions performedReview triggered.
|
PR ReviewStatus: CI green (23/23), SonarCloud quality gate PASSED (0 new issues, 0 hotspots). Copilot submitted 3 inline comments; CodeRabbit acknowledged the prior fix cycle. Agent findings: 0 Critical / 2 Important / 3 Suggested / 1 Informational. Important (should fix)
Suggested (consider addressing)
Informational
Recommended actions: address Important #1 (dependency-security skip) and #2 (PR body Summary). Suggested items can defer to a follow-up. After items 1-2, PR is mergeable. 🤖 Generated with Claude Code |
Three issues raised by Copilot's PR review: 1. python-security-analysis.yml: detect-changes job lacked timeout-minutes and step-security/harden-runner. Every other job in the file starts with harden-runner; merge_group trigger newly exposes the inconsistency on the queue ref. Added timeout-minutes: 5 and harden-runner as first step. 2. python-security-analysis.yml: dependency-security job is gated to github.event_name == 'pull_request' and is silently skipped on merge_group runs. The new RAD comment in the on: block claimed full coverage of the speculative-merge security gate. Documented the actions/dependency-review- action limitation explicitly (it requires PR base/head SHAs that don't exist on merge_group refs), confirmed the remaining 4 of 5 sub-scans still run on the queue ref, and flagged osv-scanner-on-merge_group as a follow-up coverage gap. 3. python-sonarcloud.yml: sonarcloud job lacked step-security/harden-runner. Added as first step to match the baseline used by every other security and CI template. Refs #154, #163 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Six templates carried a #CRITICAL tag on their new merge_group: trigger but omitted the paired #VERIFY instruction that CLAUDE.md RAD rules require. The verification procedure is documented once in python-ci.yml's CRITICAL block (enable merge_queue on a sacrificial repo, confirm check appears on the merge_group ref). Added a single-line pointer to that procedure rather than duplicating it in every file. The seventh template (python-security-analysis.yml) already received an inline #VERIFY in the prior commit. Templates updated: - python-cifuzzy.yml - python-compatibility.yml - python-container-security.yml - python-docs.yml - python-fips-compatibility.yml - python-reuse.yml Refs #154, #163 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
PR Fix SummaryAddressed pr-review and Copilot findings; pushed 2 commits. Important (resolved)
Suggested (resolved)
Informational (verified accurate)
Verification
CI re-run triggered by push. 🤖 Generated with Claude Code |
…tant Add CI-062 (severity: important) requiring repos with auto-merge enabled to declare a merge_queue rule on the main branch ruleset. Promote CI-040 (merge_group trigger on primary CI workflow) from suggested to important. Both checks are required for GitHub merge queue to function: - CI-040 ensures gates emit on merge_group so the queue can verify them - CI-062 ensures the ruleset actually enables the queue Cost model from the incident captured in the referenced issue: N sequential auto-merges trigger N(N+1)/2 CI runs from cascading rebases, since each merge forces every other queued PR into BEHIND state. The 2026-05-24 homelab-infra incident consumed roughly 30 min of paid Actions minutes to land 5 trivial Renovate PRs. Queue-batched, the same workload requires 1 to 2 CI runs. Companion docs: add "Merge queue and auto-merge" section to .claude/rules/git-workflow.md covering when to enable, the two prerequisites, interaction with auto-merge, and references. Companion rollout PRs: - ByronWilliamsCPA/.github#163 (org workflow templates) [merged] - homelab-infra consumer workflows [in flight] Refs ByronWilliamsCPA/.github#154 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tant Add CI-062 (severity: important) requiring repos with auto-merge enabled to declare a merge_queue rule on the main branch ruleset. Promote CI-040 (merge_group trigger on primary CI workflow) from suggested to important. Both checks are required for GitHub merge queue to function: - CI-040 ensures gates emit on merge_group so the queue can verify them - CI-062 ensures the ruleset actually enables the queue Cost model from the incident captured in the referenced issue: N sequential auto-merges trigger N(N+1)/2 CI runs from cascading rebases, since each merge forces every other queued PR into BEHIND state. The 2026-05-24 homelab-infra incident consumed roughly 30 min of paid Actions minutes to land 5 trivial Renovate PRs. Queue-batched, the same workload requires 1 to 2 CI runs. Companion docs: add "Merge queue and auto-merge" section to .claude/rules/git-workflow.md covering when to enable, the two prerequisites, interaction with auto-merge, and references. Companion rollout PRs: - ByronWilliamsCPA/.github#163 (org workflow templates) [merged] - homelab-infra consumer workflows [in flight] Refs ByronWilliamsCPA/.github#154 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tant (#150) * feat(manifest): add CI-062 merge_queue check, promote CI-040 to important Add CI-062 (severity: important) requiring repos with auto-merge enabled to declare a merge_queue rule on the main branch ruleset. Promote CI-040 (merge_group trigger on primary CI workflow) from suggested to important. Both checks are required for GitHub merge queue to function: - CI-040 ensures gates emit on merge_group so the queue can verify them - CI-062 ensures the ruleset actually enables the queue Cost model from the incident captured in the referenced issue: N sequential auto-merges trigger N(N+1)/2 CI runs from cascading rebases, since each merge forces every other queued PR into BEHIND state. The 2026-05-24 homelab-infra incident consumed roughly 30 min of paid Actions minutes to land 5 trivial Renovate PRs. Queue-batched, the same workload requires 1 to 2 CI runs. Companion docs: add "Merge queue and auto-merge" section to .claude/rules/git-workflow.md covering when to enable, the two prerequisites, interaction with auto-merge, and references. Companion rollout PRs: - ByronWilliamsCPA/.github#163 (org workflow templates) [merged] - homelab-infra consumer workflows [in flight] Refs ByronWilliamsCPA/.github#154 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(manifest): correct CI-062 verify block per review Address Copilot review findings on PR #150: - Renovate auto-merge signal must check renovate.json at the repo root (BWCPA org standard per CI-020), not .github/renovate.json. The original path was a non-standard fallback that does not exist on any audited BWCPA repo; as written, CI-062 would have fallen through to "no signal" and reported N/A for every repo. - The Rulesets API jq filter now pins the ruleset to the main branch (refs/heads/main or ~DEFAULT_BRANCH); the prior filter accepted any branch-targeted ruleset and could false-PASS on repos that declared merge_queue on a non-main ruleset. - The "no signal present" branch now reads "skip (N/A per not_applicable_when)" so it does not conflict with the existing not_applicable_when field. The two paths previously expressed the same exemption with different semantics. Also bump manifest last_updated to 2026-05-26 and align the inline header changelog entry to the same date so downstream compliance reports treat this revision as freshly modified. Refs ByronWilliamsCPA/.github#154 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(changelog,rules): record CI-062 entry and cite merge-queue threshold source Add the missing CHANGELOG.md Unreleased entry for the CI-062 addition and CI-040 severity promotion. Per CLAUDE.md OpenSSF baseline, feat commits must update CHANGELOG before release. In .claude/rules/git-workflow.md, source-cite the "roughly 5 dependency-bump PRs per week" enablement threshold to the homelab-infra incident captured in ByronWilliamsCPA/.github#154 so future readers treat the number as an incident-derived heuristic rather than a documented org policy. Refs ByronWilliamsCPA/.github#154 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…tant (#150) * feat(manifest): add CI-062 merge_queue check, promote CI-040 to important Add CI-062 (severity: important) requiring repos with auto-merge enabled to declare a merge_queue rule on the main branch ruleset. Promote CI-040 (merge_group trigger on primary CI workflow) from suggested to important. Both checks are required for GitHub merge queue to function: - CI-040 ensures gates emit on merge_group so the queue can verify them - CI-062 ensures the ruleset actually enables the queue Cost model from the incident captured in the referenced issue: N sequential auto-merges trigger N(N+1)/2 CI runs from cascading rebases, since each merge forces every other queued PR into BEHIND state. The 2026-05-24 homelab-infra incident consumed roughly 30 min of paid Actions minutes to land 5 trivial Renovate PRs. Queue-batched, the same workload requires 1 to 2 CI runs. Companion docs: add "Merge queue and auto-merge" section to .claude/rules/git-workflow.md covering when to enable, the two prerequisites, interaction with auto-merge, and references. Companion rollout PRs: - ByronWilliamsCPA/.github#163 (org workflow templates) [merged] - homelab-infra consumer workflows [in flight] Refs ByronWilliamsCPA/.github#154 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(manifest): correct CI-062 verify block per review Address Copilot review findings on PR #150: - Renovate auto-merge signal must check renovate.json at the repo root (BWCPA org standard per CI-020), not .github/renovate.json. The original path was a non-standard fallback that does not exist on any audited BWCPA repo; as written, CI-062 would have fallen through to "no signal" and reported N/A for every repo. - The Rulesets API jq filter now pins the ruleset to the main branch (refs/heads/main or ~DEFAULT_BRANCH); the prior filter accepted any branch-targeted ruleset and could false-PASS on repos that declared merge_queue on a non-main ruleset. - The "no signal present" branch now reads "skip (N/A per not_applicable_when)" so it does not conflict with the existing not_applicable_when field. The two paths previously expressed the same exemption with different semantics. Also bump manifest last_updated to 2026-05-26 and align the inline header changelog entry to the same date so downstream compliance reports treat this revision as freshly modified. Refs ByronWilliamsCPA/.github#154 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(changelog,rules): record CI-062 entry and cite merge-queue threshold source Add the missing CHANGELOG.md Unreleased entry for the CI-062 addition and CI-040 severity promotion. Per CLAUDE.md OpenSSF baseline, feat commits must update CHANGELOG before release. In .claude/rules/git-workflow.md, source-cite the "roughly 5 dependency-bump PRs per week" enablement threshold to the homelab-infra incident captured in ByronWilliamsCPA/.github#154 so future readers treat the number as an incident-derived heuristic rather than a documented org policy. Refs ByronWilliamsCPA/.github#154 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>



Summary
merge_group:trigger to nine workflow templates so GitHub merge queue can satisfy required-status-check policies on consumer repos:workflow-templates/python-ci.ymlworkflow-templates/python-cifuzzy.ymlworkflow-templates/python-compatibility.ymlworkflow-templates/python-container-security.ymlworkflow-templates/python-docs.ymlworkflow-templates/python-fips-compatibility.ymlworkflow-templates/python-reuse.ymlworkflow-templates/python-security-analysis.ymlworkflow-templates/python-sonarcloud.ymlmerge_queuein its branch ruleset, so this is safe to land before any rollout.workflow-templates/python-pr-validation.ymlis intentionally excluded because the reusable workflow it calls (.github/workflows/python-pr-validation.yml) is deprecated (header says "WILL BE REMOVED IN A FUTURE RELEASE", recommends migrating topython-ci.yml).detect-changesjob (timeout + harden-runner) inpython-security-analysis.yml, added harden-runner tosonarcloudjob inpython-sonarcloud.yml, and documenteddependency-review-action's lack ofmerge_groupsupport as a known limitation with a follow-up note for osv-scanner-on-merge_group coverage.Why
From #154: when a fleet of compatible Renovate PRs auto-merges serially, GitHub cascades rebases at
N(N+1)/2CI runs per N PRs. Enabling merge queue collapses that to1..Nruns by batching against a single speculative HEAD. The queue can only verify required status checks if those workflows actually emit on themerge_groupevent, so the template gap is the prerequisite for issue #154's rollout.Standards manifest cross-reference
CI-040(severity: suggested) indocs/standards-manifest.yamlalready requires.github/workflows/ci.ymlto respond tomerge_group. The current note says the check is override-eligible while the trigger is missing from templates. This PR closes that gap for the nine PR-gate templates. A follow-up PR in the~/.claude/repo will:CI-062(severity: important) for repos with auto-merge enabled, requiring queue enablement on the main ruleset.CI-040fromsuggestedtoimportantafter templates propagate to consumers (~24h Renovate cycle).RAD compliance
All nine templates carry a
#CRITICALtag on the newmerge_group:trigger. The full#VERIFYprocedure is documented inline inpython-ci.yml; the other eight templates carry a one-line pointer to that procedure to satisfy CLAUDE.md's "#CRITICALmust be paired with#VERIFY" rule without duplicating the verification text nine times.Test plan
homelab-infra(or push manually for validation).merge_queueonhomelab-inframain ruleset via API.merge_groupref produces check runs named "CI Gate", "Security Analysis / ...", and "SonarCloud / ..." viagh api repos/ByronWilliamsCPA/homelab-infra/commits/<sha>/check-runs.Refs #154
Generated with Claude Code