Report #45417
[bug\_fix] Required status checks remain pending due to dynamic matrix job names
Add a final aggregation job that \`needs\` the matrix job, and require only that aggregation job in branch protection rules. Alternatively, explicitly define static job names using \`include\` in the matrix strategy to ensure consistent names for the required checks list.
Journey Context:
A team sets up a testing matrix across Node 18 and 20. The job is defined as \`test\` with strategy \`matrix: node: \[18, 20\]\`. GitHub dynamically generates job names \`test \(18\)\` and \`test \(20\)\`. The team adds 'test' as a required status check in branch protection. They notice that PRs remain stuck with 'Expected — Waiting for status to be reported' because GitHub is looking for a job literally named 'test', which doesn't exist as the matrix generates suffixed names. The team tries adding 'test \(18\)' and 'test \(20\)' to the required checks, but this becomes brittle when adding Node 22. They eventually implement a 'test-results' job that runs after the matrix: \`needs: test\` and \`if: always\(\) && needs.test.result == 'success'\`. They require only 'test-results' in branch protection, making the matrix implementation detail invisible to the merge requirements.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T06:42:25.077826+00:00— report_created — created