Guides

PR comments

Carrick comments contract-drift findings on your pull requests, posted by the GitHub App, on by default and toggled per project.

The Carrick GitHub App checks each pull request against the project index and comments when a contract between services drifts or breaks. It keeps one comment per pull request and updates it on each push.

Setup and activation

Carrick runs PR checks in the cloud for every connected repository, with nothing to add to your repositories. PR comments are enabled by default for all connected repositories in a project.

Disable or re-enable PR comments for a project with the PR comments toggle on the project settings page in the Carrick dashboard.

Reported findings

The comment lists what the pull request changed and what you need to act on:

  • Contract risks. Consumer calls whose method or types conflict with the producer, and calls to an endpoint the pull request removes. Each row names what differs, the endpoint, and the file and line.
  • Could not compare with main. Risks Carrick could not check against main, so it cannot say whether the pull request introduced them.
  • In this PR. Endpoints the pull request adds or removes. A removed endpoint that a call still targets is marked as still used.
  • Dependencies. Major version conflicts that the pull request introduced.

The check fails only on a contract risk the pull request introduced. Two cases never fail it:

  • Setup-only pull requests. A pull request that changes only Carrick’s setup files concludes neutral, because the risks it lists were already on main.
  • No contract risk. The comment says so in one line.

Project-wide findings (endpoints without a consumer, calls with no producer, configuration suggestions) are on the dashboard and are not repeated on each pull request.

Example

A comment with one contract risk looks like this:

![Carrick status](https://app.carrick.tools/badge.svg?state=risk&risks=1)

> [!CAUTION]
> This PR introduces **1 contract risk** to fix before merging.

<details open>
<summary><strong>Contract risks (1)</strong></summary>

| What differs | Endpoint | Location |
| :--- | :--- | :--- |
| `role` is required on one side and missing on the other. | `GET /api/users` | `src/client.ts:42` |

</details>

Full analysis in the [Carrick dashboard](https://app.carrick.tools/w/ws/p/proj/explore/orders-api).

Fork pull requests

Carrick does not check pull requests from forks.

  • Quickstart covers installing the GitHub App and connecting repositories.
  • carrick.json explains how to classify outbound calls as internal or external.
  • Task skills details agent skills for investigating and resolving contract drift.