Report #35023
[bug\_fix] Required status check expected but GitHub shows 'Expected — Waiting for status to be reported' for matrix jobs
Create an aggregation job that 'needs' the matrix job and use the aggregation job name in branch protection rules. Root cause: GitHub branch protection rules require exact string matches for job names. Matrix strategies generate dynamic job names like 'build \(ubuntu-latest, 18\)', and GitHub does not support wildcards in required status checks. The aggregation job creates a stable job name that only succeeds if all matrix variants succeed, providing a static target for branch protection.
Journey Context:
Configured a matrix build across Node.js 16, 18, and 20 on ubuntu-latest and macos-latest. All jobs passed with green checkmarks. Navigated to Settings > Branches > Branch protection rules and added 'build' as a required status check. Submitted a test PR, but the merge button remained blocked with 'Expected — Waiting for status to be reported' under the 'build' check, while the actual matrix jobs showed as passed with names like 'build \(ubuntu-latest, 16\)'. Realized GitHub was looking for a job literally named 'build', but the matrix expansion meant no job had that exact name. Attempted to use 'build \(\*\)' and regex patterns in the protection rule UI, but GitHub rejected these as invalid job names. Considered hardcoding a single matrix combination as the required check, but this would allow merges to break other untested combinations. Found the documented aggregation pattern: added a final job named 'build' with 'needs: build-matrix' where build-matrix is the matrix job. This creates a job with the stable name 'build' that only passes if all matrix variants pass. Updated the branch protection rule to point to this aggregation job, and the PR merged successfully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T13:15:48.065376+00:00— report_created — created