---
title: "The rerun passed: what did it run on? | Proofline"
description: "A re-run in GitHub Actions uses the same commit and ref as the original event, so a pass on the second attempt shows that the result can differ on one commit."
url: https://proofline.sh/learn/rerun-passed-handoff/
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/)

# The rerun passed: what did it run on?

A re-run in GitHub Actions uses the same commit and ref as the original event, so a pass on the second attempt shows that the result can differ on one commit. Record both attempts before you hand over a green check.

Code review The Proofline team November 24, 2026 3 min read

## What stays the same and what does not

GitHub's documentation says that a re-run uses the same `GITHUB_SHA` and `GITHUB_REF` as the event that first triggered the workflow, and that a run can be re-run up to 30 days after its initial run. [Re-running workflows and jobs](https://docs.github.com/en/actions/how-tos/manage-workflow-runs/re-run-workflows-and-jobs)

| Same on a re-run | Can differ |
| --- | --- |
| Commit and ref | Time of day, and anything that depends on it |
|  | The machine, and its load |
|  | Images and packages named by a moving tag or range |
|  | Caches written in between |
|  | External services and their data |
|  | Test order, if the seed comes from the clock |
|  | Which jobs ran, when only failed jobs were re-run |

For a pull request, the same commit means the same merge commit. If the base branch has since gained a fix, a re-run still tests the old combination. A new push, or a merge of the base, tests the new one. The [merge commit guide](/learn/pull-request-head-or-merge-commit/) shows how to read it.

## Read the attempts

`github.run_attempt` starts at 1 and increments with each re-run. Put it in artifact names and in the log, or the second attempt replaces the first:

```
- run: echo "run ${{ github.run_id }} attempt ${{ github.run_attempt }}"
```

The [contexts reference](https://docs.github.com/en/actions/reference/workflows-and-actions/contexts) defines both. Afterwards, the API returns an earlier attempt:

```
gh api repos/OWNER/REPO/actions/runs/RUN_ID --jq '.run_attempt, .conclusion'
gh api repos/OWNER/REPO/actions/runs/RUN_ID/attempts/1 --jq '.conclusion, .head_sha'
```

A conclusion of `success` with `run_attempt` 3 means that somebody re-ran it twice. It does not say that the first two failed in the tests, since a cancelled runner also leads to a re-run. Read each attempt's failing step.

## Decide from the first failure

| First attempt's failing step | A pass on re-run means | Next |
| --- | --- | --- |
| Checkout, install, image pull | The network or registry recovered | Accept, and count how often it happens |
| Runner lost, out of memory | The machine differed | Accept only if memory use did not change in this commit |
| A test, with an error from this change's area | The result varies on this commit | Do not accept the pass as an answer. Find what varied |
| A test, unrelated area, with a known record | It matched a known pattern | Link that record |
| A test, unrelated area, no record | Unknown | Open the record with both attempts, then decide |

"Unrelated area" is the judgment that hides defects. A change can break a distant test through shared state, so state why you believe it is unrelated.

## Worked example

This example is fictional. A pull request is green on attempt 3. Attempts 1 and 2 failed one checkout test with a zero total, and the change touches the cart's cache. The author's note says "flaky, re-ran". Ben puts the two errors and the pass side by side and asks for [a failure count](/learn/intermittent-failure-rate-handoff/) on this commit and on its base: 9 of 60 against 0 of 60. The check was green, and the change was the cause.

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

-   ### [Which commit did the pull request's tests run on?](/learn/pull-request-head-or-merge-commit/)
    
    Code review The Proofline team November 24, 2026 2 min read
    
-   ### [State how often an intermittent test fails](/learn/intermittent-failure-rate-handoff/)
    
    Code review The Proofline team November 24, 2026 3 min read
