> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trunk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Reduce false skips

> What to do when Dynamic CI skips a job that should have run.

A **false skip** is an agentic skip of a job that then failed: later in the same
run, or in the merge queue. A rule skip, from a [path filter](https://docs.trunk.io/dynamic-ci/configuration/path-filters.md)
or an **Always Skip** schedule, is never a false skip.

The [Health page](https://app.trunk.io/dynamic-ci) shows each repository's
false skip rate: false skips divided by agentic skips. Dynamic CI learns from
every false skip, and a job that failed in the merge queue always runs on the
pull request's next push. When one job's rate stays high, use the fixes below.

## Run the job before the queue

With Trunk Merge Queue, set the job to [Run Before Queue](https://docs.trunk.io/dynamic-ci/run-before-queue.md)
(beta) in [Configuration → Jobs](https://docs.trunk.io/dynamic-ci/configuration/jobs.md#run-before-queue).
Dynamic CI still skips it on most pushes, but Trunk makes sure it has run
before the pull request enters the merge queue, so a break is caught on the
pull request rather than evicting it from the queue and restarting tests on other
merge items.

* **On any commit** runs the job once unless it already passed on a commit of
  the pull request. Use it for quick jobs such as unit tests. Slow suites
  hold the pull request longer before the queue tests it; see
  [Set up each kind of job](https://docs.trunk.io/dynamic-ci/guides/job-archetypes.md).
* **On the head commit** runs the job on the exact commit that enters the queue.
  Use it for lightweight freshness checks.

## Send your build tool's impact

Dynamic CI can't see how much of your codebase a change reaches. If your build
tool can, such as a count of affected packages from Nx, Bazel or Turborepo,
send it with each plan request. Dynamic CI then runs jobs on broad changes and
leans toward skipping narrow ones.

Each impact is a JSON list with one entry per measure:

* `source`: your name for the measure: lowercase letters, digits, `.`, `_`
  and `-`. Keep it the same on every run.
* `count`: a whole number. Send `0` when nothing is affected.
* `all: true` in place of `count` when everything is affected. A job runs on
  such a change unless it already passed on that commit.

Leave impacts unset when your tool computed nothing. A bad entry is dropped
with a warning, and the run continues.

> [tab] GitHub Actions
>
> Pass the list in the action's `impacts` input (v0.1.7 or later; `@v1`
> has it), from an earlier step or job that computed it:
>
> ```yaml theme={"system"}
> - id: dynamic-ci
>   uses: trunk-io/dynamic-ci@v1
>   with:
>     token: ${{ secrets.TRUNK_API_TOKEN }}
>     impacts: ${{ steps.affected.outputs.impacts }}
> ```

> [tab] Buildkite
>
> Export the list in the upload step's command, before the filter runs
> (plugin v0.1.8 or later):
>
> ```bash theme={"system"}
> export BUILDKITE_PLUGIN_DYNAMIC_CI_IMPACTS='[{"source":"tainted-packages","count":734}]'
> ```
>
> For a value known when the pipeline is written, use the plugin's `impacts`
> option instead.

Then turn on **Impact reach** in **Configuration** → **Signals** in the Trunk
web app, and [ask us](https://slack.trunk.io) to set the limit for each job.
Impacts are used on pull requests only.

## Run the job every time

If a job must never be skipped on a pull request, set its pull request
schedule to **Always Run** in [Configuration → Jobs](https://docs.trunk.io/dynamic-ci/configuration/jobs.md).

## Tell us

If a job keeps being skipped when it shouldn't, [tell us on Slack](https://slack.trunk.io)
with the repository and the job. False skips are how Dynamic CI is tuned during
the beta.
