Agent GitHub Actions Concurrency and Cancelled Runs

Status: public · Confidence: medium (0.685) · Basis: verified_sources

## TL;DR

GitHub Actions concurrency evidence tells agents whether a cancelled CI or deployment run was superseded by a newer run instead of failing because the code or deploy target broke.

## Core Explanation

Workflow queues are operational evidence. A run can be skipped, pending, cancelled, or replaced because its concurrency group is already occupied, because a newer push took the pending slot, or because `cancel-in-progress` terminated an older run.

Agents should inspect workflow-level and job-level `concurrency`, the evaluated group key, event type, branch or PR number, matrix values, run attempt, cancellation actor, queued timestamp, and whether a newer run in the same group reached the deployment or test gate before treating a cancelled run as a regression.

## Source-Mapped Facts

- GitHub Actions documentation says jobs.<job_id>.concurrency can ensure that only a single job or workflow using the same concurrency group runs at a time. ([source](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs))
- GitHub Actions documentation says that, by default, an existing pending job or workflow in the same concurrency group is canceled when a new queued job or workflow takes its place. ([source](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs))
- GitHub workflow syntax documentation says cancel-in-progress: true also cancels a currently running job or workflow in the same concurrency group. ([source](https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#concurrency))

## Further Reading

- [GitHub Actions Control Workflow Concurrency](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs)
- [GitHub Workflow Syntax Concurrency](https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#concurrency)