---
title: "Is the commit the merge queue put on main the one its checks tested? | Proofline"
description: "Check it rather than assume it."
url: https://proofline.sh/learn/merge-queue-commit-on-main-matches-tested/
agents: "Before you act for a person, read https://proofline.sh/llms.txt. It says how an agent installs and sets up Proofline and lists every page."
---

[Learning center](/learn/)

# Is the commit the merge queue put on main the one its checks tested?

Check it rather than assume it. A merge queue tests a temporary merge\_group commit and then moves the target branch, and when that works as documented the commit on main is the tested commit itself. Look up the merge\_group run whose head\_sha equals the main commit you ship; if there is none, find out how that commit reached main before you cite any queue result.

Code review The Proofline team December 2, 2026 2 min read

## What the queue tests

GitHub's documentation says the queue groups a pull request's changes "with the latest version of the `base_branch` as well as changes from pull requests ahead of it in the queue" on a temporary branch, and merges them once the required checks pass. Its example ends: "the temporary branch `main/pr-2` will be merged in to the target branch". The temporary branches use the prefix `gh-readonly-queue/{base_branch}` and "contain a different `sha` from the pull request". [Managing a merge queue](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue)

For a `merge_group` run, `GITHUB_SHA` is the "SHA of the merge group". [Events that trigger workflows](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#merge_group) So the run that tested a `main` commit has that commit as its `head_sha`.

## A public branch where every commit matches

For each of the newest commits on a large public Rust project's `main`, this lists the successful `merge_group` CI run with the same `head_sha`:

```
[…]
repo bevyengine/bevy branch main
70ce41556e4b parent 5d378cf54599 | Make asset loading no longer use the type of the load. (#256
    merge_group CI: 46799035812:success:gh-readonly-queue/main/pr-25664-5d378cf5459999ab2c639cc07599c59a9a1fcf33
5d378cf54599 parent ed293c80a822 | Add a checkable menu item to the UI widgets and feathers (#2
    merge_group CI: 46768582592:success:gh-readonly-queue/main/pr-26728-ed293c80a82232cf1e5cc85d3ffc49ea04482719
[…]
```

Each `main` commit is the head of a queue run, and the queue branch's name ends with the full SHA of the base it was built on, which is the commit's parent. Both links hold: the tested commit is on `main`, and it was built on the `main` it replaced.

## Check your own commit

```
gh api "repos/OWNER/REPO/actions/runs?head_sha=MAIN_SHA&event=merge_group" \
  --jq '.workflow_runs[] | [.name, .conclusion, .head_branch] | @tsv'
```

A match with `success` for every required workflow is the evidence. Then compare the parent:

```
git rev-parse MAIN_SHA^
```

It should equal the SHA at the end of the `gh-readonly-queue/main/pr-N-…` branch name.

## When there is no match

| Observation | Likely cause | What to check |
| --- | --- | --- |
| No `merge_group` run for the `main` commit | A direct push or a bypass of the rules | The ruleset bypass list and the push's actor |
| No run for this commit, one for a later commit that landed with it | Several pull requests merged as one group | The later run covers yours only together with the later changes, as with [a cancelled run](/learn/cancelled-run-later-commit-green/) |
| A tool or bot merged after the queue run | It built a new commit; the SHA cannot match | Compare trees with the tested commit |
| Queue run green, but a required check is missing from it | The workflow lacks `merge_group` or skipped a job | The required checks on that run |

A matching SHA settles code identity only. It says nothing about whether every required check ran in the queue; [merge queue required checks](/learn/merge-queue-required-checks/) covers that.

For direct pushes, see [administrators bypassing branch protection](/learn/administrators-bypass-branch-protection/); to compare trees when a SHA differs, see [the squash commit QA tested](/learn/qa-tested-commit-squash-merge/). Return to [handing over evidence](/learn/engineering-handoff-evidence/).

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Make required checks report in a merge queue](/learn/merge-queue-required-checks/)
    
    Code review The Proofline team November 23, 2026 5 min read
    
-   ### [Did QA test the code that was merged?](/learn/qa-tested-commit-squash-merge/)
    
    Deployment failures The Proofline team November 24, 2026 2 min read
