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

# Pipeline Analysis

> Turn on pipeline analysis so every failed CI run gets a root-cause explanation and a suggested fix, without reading raw job logs.

A pipeline is your CI system's build-and-test run for a commit. With pipeline analysis on, Review picks up each failed run, reads the failed jobs, and writes findings that explain why it broke and how to fix it.

## Prerequisites

* A repository connected through [Review setup](https://docs.cloudthinker.io/guide/code-review/setup.md), with its provider sending pipeline events:

  | Provider | What sends pipeline events | CI analyzed |
  | - | - | - |
  | GitHub | The CloudThinker GitHub App | GitHub Actions workflow runs |
  | Bitbucket | Registered for you during setup | Bitbucket Pipelines |
  | GitLab | The **Pipeline events** trigger on your webhook | GitLab CI/CD pipelines |
  | Azure DevOps | A **Build completed** service hook | Azure Pipelines builds |

  Review fetches jobs and logs from these CI systems only, so runs from other CI tools, such as check runs another tool posts on GitHub, aren't analyzed. See [Configure webhooks](https://docs.cloudthinker.io/guide/code-review/provider-auth.md#configure-webhooks). AWS CodeCommit repositories don't support pipeline analysis.
* The workspace **Admin** role to turn analysis on or start one by hand. Everyone else can read runs and findings. See [roles](https://docs.cloudthinker.io/guide/security/roles.md).

## Turn on pipeline analysis

Pipeline analysis is a workspace-wide setting and is off by default. There's no per-repository switch: once it's on, every failed run from a connected repository that sends pipeline events is analyzed.

**1. Open Review settings**

Go to **Review → Settings**.

**2. Switch it on**

In the **General** section, turn on **Pipeline analysis**. You can also click **Turn on** in the banner at the top of **Review → Pipelines**.

**Success state:** the toast reads "Pipeline analysis enabled", and new CI runs from your connected repositories start to appear on **Review → Pipelines**.

## How a failed run becomes findings

1. Your provider sends a pipeline event, and Review records the run with its status and commit.
2. Only failed runs are analyzed. Successful, running, pending and cancelled runs are listed but never analyzed, and a run is never analyzed twice.
3. Review fetches the failed jobs and the last 50 KB of each job's log through your Git connection. When the run belongs to a reviewed MR or PR, Review links it so the analysis can use that change's review context.
4. CloudThinker analyzes the failed jobs in a Chat conversation and writes root-cause findings with a suggested fix. Workspace admins get a **Pipeline analysis** notification when it finds issues. Choose where it goes in [notification settings](https://docs.cloudthinker.io/guide/notifications.md).

> [!NOTE]
>
> Only the last 50 KB of each failed job's log is read. If the real error comes earlier, for example a compile error followed by a long test dump, the analysis can miss it. Fail fast, or trim verbose output from the job, so the error lands near the end of the log.

The analysis is an agent conversation, so the [data protection](https://docs.cloudthinker.io/guide/security/data-protection.md) rules for tool output apply to the logs it reads.

## Check a failed run

**1. Open the run list**

Go to **Review → Pipelines**. Each row shows the run **Status**, the **Pipeline** (repository, number and commit), and the **Analysis** state. Narrow the list with **Search runs**, **Any status** and **Any analysis**.

**2. Start an analysis if one hasn't run**

A failed run marked **Not analyzed** shows an **Analyze** button. Click it to start without waiting.

**Success state:** the toast reads "Pipeline analysis started" and the row moves to **Analyzing**.

**3. Read the findings**

Open the run. **Pipeline jobs** shows each stage and job with its status. **Findings** lists the root causes with **Severity**, **Issue**, **Location** and **Status**. Status reads **Open** until someone settles the finding, then **Resolved**, **Acknowledged** or **Withdrawn**. Open a finding for its **Description** and **Suggested Fix**.

**4. Hand the fix off**

On a finding, click **Copy prompt** to copy a ready-made fix request for your coding agent, or **View file** to jump to the failing code on your provider. On the run list, click an **Analyzed** badge to open the full analysis in Chat.

The list uses two kinds of status:

| Run status | Meaning |
| - | - |
| Pending, Running | The pipeline hasn't finished on your provider |
| Success | It passed. No analysis |
| Failed | It failed and can be analyzed |
| Cancelled | It was cancelled. No analysis |

| Analysis | Meaning |
| - | - |
| Not analyzed | A failed run waiting for analysis |
| Analyzing | CloudThinker is reading the failed jobs |
| Analyzed | Findings are ready |
| Analysis failed | Fetching the jobs or starting the analysis failed. There's no retry button: rerun the pipeline on your provider to get a new run |

## Troubleshooting

> [accordion] Review → Pipelines says No pipeline runs yet
>
> Check that **Pipeline analysis** is on and that your provider's webhook is set up to send pipeline events. Then push a commit that runs a pipeline.

> [accordion] The page says Pipeline analysis unavailable
>
> Pipeline analysis is off for this workspace and you don't have the workspace Admin role. Ask a workspace Admin to turn it on.

> [accordion] A failed run shows Analysis failed
>
> Review couldn't fetch the failed jobs from your provider or couldn't start the analysis. A run is analyzed only once, so check that your Git connection is healthy in [Review setup](https://docs.cloudthinker.io/guide/code-review/setup.md), then rerun the pipeline on your provider to get a new run.

> [accordion] I don't see the Analyze button
>
> The button only shows on failed runs marked **Not analyzed**, and only to workspace Admins.

## Next steps

> [card] [Release Risk](https://docs.cloudthinker.io/guide/code-review/releases.md)
>
> Check whether a release is safe to ship before you deploy

> [card] [Review Insights](https://docs.cloudthinker.io/guide/code-review/analytics.md)
>
> Track review quality and get weekly repository reports

> [card] [Mention commands](https://docs.cloudthinker.io/guide/code-review/mention-commands.md)
>
> Talk to Review from MR and PR comments

> [card] [Notifications](https://docs.cloudthinker.io/guide/notifications.md)
>
> Choose where Review alerts and digests go


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.